Gitexit code > 0

fatal: not a git repository

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

Analysis

You are running a git command outside of a git repository.

Common Triggers

  • Current directory is not initialized as a git repo.
  • You are in the wrong directory.

Debug Checks

  • $Run ls -a to look for a .git directory.
  • $Check pwd to confirm your location.

Resolution

1
Run git init to start a new repository.
2
Navigate to the correct repository directory.