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

Git

Git Problem Overview


When I tried to push an existing repository on github.com, and it when I entered the command the website prompted me to put into the terminal, I got this error message fatal:

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

If anyone could help me with this, then that would be great, thanks.

Git Solutions


Solution 1 - Git

The command has to be entered in the directory of the repository. The error is complaining that your current directory isn't a git repo

  1. Are you in the right directory? Does typing ls show the right files?
  2. Have you initialized the repository yet? Typed git init? (git-init documentation)

Either of those would cause your error.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser3072482View Question on Stackoverflow
Solution 1 - GitDaniel GratzerView Answer on Stackoverflow