![]() To solve the first situation, check the folder in which you are currently trying to run the command again. Let’s refer back to the previous section where we discussed the two situations in which one gets a fatal: not a git repository error. You are in the project directory, but you didn’t initialize the Git repository for that project folder. You tried to run the command but did not navigate to the project folder where the git repository is located.Ģ. The fatal: not a git repository error makes it clear that you’re not in a git repository, but the reason you’re not in such a repository may be one of two:ġ. What causes “fatal: not a git repository”? Fortunately, even if it is a very common problem, it is also very easy to solve. git, states that you tried to execute a repository-specific command, outside of the Git repository. The error above, fatal: not a git repository (or any of the parent directories). ![]() For example, if you run git push -u origin master outside of a git repository, Git will simply not know what to push and where to push. Most of the Git commands must be executed against a Git repository. What is the “fatal: not a git repository” error?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |