Interview Prep/Git & GitHub/Authentication and Remote Access

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

BeginnerTroubleshootingAuthentication and Remote Access
Answer

Likely causes → You are in the wrong directory, the repo was never initialised, or the .git folder was deleted.

Diagnose →

pwd
git rev-parse --show-toplevel
ls -la | grep .git

Fix → cd into the project, or run git init for a new one. If .git was removed, re-clone and copy your working files over.

Prevent → Show the branch in your shell prompt so you notice when you are outside a repo.

All Git & GitHub questions Roadmap: Git & GitHub

More on Authentication and Remote Access