[Solved]fatal: not a git repository (or any of the parent directories): .git

Sumedha Gn
1 min readJul 16, 2020

The error means that you are running a Git command outside of a Git repository.

To solve:

  1. 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.
  2. Else, clone the repository from Github.

How to clone a Git repo with HTTPS:

  1. 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/…

--

--

Sumedha Gn

Documenting errors I’ve faced so you can save time trying to resolve them, feel free to let me know how I can improve too!