Common causes
- You're in the wrong directory — navigate to your project folder first
- The repository was never initialized with git init
- The .git folder was accidentally deleted
- You cloned a project but are in a parent or sibling directory
How to fix it
- cd into your project directory: cd /path/to/your/project
- Initialize a new repo if needed: git init
- Check your current directory: pwd (Mac/Linux) or cd (Windows)
- If the .git folder was deleted, clone the repo again: git clone <url>
Example
fatal: not a git repository (or any of the parent directories): .gitRunning git status from a directory that isn't a Git repo
Have a different error?
Paste any error message into the Error Translator to get an instant explanation.
