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