title: Why does git not recognise my local repository?
body: <p>I just jumped back into a project that I've been using Git on for about 6 months and saw this:</p>
  <pre><code>$ cd /d/DEVELOP/BlenderAe # My repo root
  $ git status
  fatal: not a git repository (or any of the parent directories): .git
  </code></pre>
  <p>That's definitely the right path, why does git not recognise my local clone?</p>
  <p>My last actions were:</p>
  <ul>
  <li>create local branch</li>
  <li>work on local branch (switched to local branch in VSCode... culprit?)...</li>
  <li>saved but not pushed to remote (I'll never miss this step again! Argh!).</li>
  </ul>
  <p>The git folder contents are as follows:</p>
  <pre><code>$ cd /d/DEVELOP/BlenderAe # My repo root
  $ ls .git
  ORIG_HEAD  objects/  refs/
  </code></pre>
  <p>I do have the current code (backed it up, outside of git). How do I reconnect? And also to my github remote?</p>
  <hr />
  <p>After fixing <code>ORIG_HEAD</code> I see:</p>
  <pre><code>$ git status
  Not currently on any branch.
  Changes to be committed:
    (use &quot;git restore --staged &lt;file&gt;...&quot; to unstage)
          deleted:    (old_file1).py
          ...all the older files that were previously renamed/deleted are listed here for deletion.
  
  Untracked files:
    (use &quot;git add &lt;file&gt;...&quot; to include in what will be committed)
          Current_file1.py
          ...all the current files are listed here as untracked.
  </code></pre>