[Solved]fatal: not a git repository (or any of the parent directories): .git
1 min readJul 16, 2020
The error means that you are running a Git command outside of a Git repository.
To solve:
- Make sure you are in the correct directory. One way to check, you should be able to see a .git hidden folder in the directory.
- Else, clone the repository from Github.
How to clone a Git repo with HTTPS:
- Under ‘Code’, make sure the modal (pop-up) header is ‘Clone with HTTPS’. Copy the repo URL by clicking the clipboard icon.
2. Open up the terminal/command prompt > cd to a directory (to place the cloned repo)
For example:
cd Documents\Project\
3. Run the following command:
git clone https://github.com/…