0

After cloning a git repository using

git clone https://github.com/********/****.git 

I just tried to push something into the same git repo, but it shows:

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

How can I fix this?

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
Nikhil
  • 13
  • 1
  • 2

2 Answers2

7

You probably forgot to switch to the project directory after pulling the project.

$> cd PATH_TO_YOUR_PROJECT_DIR can solve your problem.

fewlinesofcode
  • 3,007
  • 1
  • 13
  • 30
  • there is no any directory in the name of that git repo – Nikhil Nov 22 '18 at 05:06
  • 1
    @Nikhil, let's say i'm clonning project using command `$> https://github.com/fewlinesofcode/myProj.git`, then, after clonning my next command will be `$> cd myProj`. `myProj` is the directory name if it's not set manually. You should replace `myProj` with the name of your project – fewlinesofcode Nov 22 '18 at 05:31
0

Either you forgot to switch to the project directory or the clone process was not successful. Please check carefully.

Nikhil Unni
  • 739
  • 5
  • 12