not a git repository (or any of the parent directories): .git code example

Example 1: fatal: Not a git repository (or any of the parent directories): .git

# You are try to run the command outside of the git initialization PATH.
#run command at .git created PATH
# Now your problem will resolve if not then try to initialize
git init

Example 2: not a git repository fatal error

$ git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/liggghts
Cloning into 'liggghts'...
remote: Counting objects: 3005, done.
remote: Compressing objects: 100% (2141/2141), done.
remote: Total 3005 (delta 1052), reused 2714 (delta 827)
Receiving objects: 100% (3005/3005), 23.80 MiB | 2.22 MiB/s, done.
Resolving deltas: 100% (1052/1052), done.

$ git status
fatal: Not a git repository (or any of the parent directories): .git
$ cd liggghts/
$ git status
# On branch master
nothing to commit (working directory clean)

Example 3: fatal: Not a git repository (or any of the parent directories): .git

# fatal: Not a git repository (or any of the parent directories): .git
#you are trying to create .git into Not a git repository
git init # it will Initialized empty Git repository.
#after that type git command