Undo Git mistakes

Fix "fatal: not a git repository"

You're running Git in a folder that isn't a Git project. Move into the project, or start a new repo.

Fill these in once
  1. Check which folder you're in
    Terminal
    pwd
  2. Go to your project folder
    Terminal
    cd ~/projects/my-app
  3. Or, if this folder should be a repo, start one
    Terminal
    git init

Check it worked

  1. Check Git sees the project
    Terminal
    git status
  1. Check which folder you're in
    Terminal · Ubuntu / Debian
    pwd
  2. Go to your project folder
    Terminal · Ubuntu / Debian
    cd ~/projects/my-app
  3. Or, if this folder should be a repo, start one
    Terminal · Ubuntu / Debian
    git init

Check it worked

  1. Check Git sees the project
    Terminal · Ubuntu / Debian
    git status
  1. Check which folder you're in
    PowerShell
    Get-Location
  2. Go to your project folder
    PowerShell
    cd ~/projects/my-app
  3. Or, if this folder should be a repo, start one
    PowerShell
    git init

Check it worked

  1. Check Git sees the project
    PowerShell
    git status