🌿Not a git repository
fatal: not a git repository (or any of the parent directories): .git
The folder your terminal is in right now isn't a project folder managed by git.
🤔 Why does it happen?
- The terminal is in a folder other than the project
- git init hasn't been run yet
🔧 Try this
- Move to the project folder with cd
- If it's your first time, run git init in the project folder
🤖 Ask your AI like this
I get 'fatal: not a git repository' when I use git commands. My computer is [Mac/Windows]. Please tell me how to move to my project folder and how to create a git repository for the first time.
Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.
Related terms
Other errors in this group
- Push rejected
failed to push some refs (rejected) - Merge conflict
CONFLICT (content): Merge conflict - GitHub authentication failed
Permission denied (publickey) - Can't combine two different histories
fatal: refusing to merge unrelated histories - File too big to upload to GitHub
File exceeds GitHub's file size limit of 100.00 MB - Push blocked because it contains a secret key
Push cannot contain secrets (GH013)