With some help I managed to recover a local git project from a fatal: not a git repository (or any of the parent directories): .git
issue... Why does git not recognise my local repository?
But now my local git is ahead on a new local branch (that doesn't exist on the GitHub remote) and is disconnected from the existing remote origin.
git remote -v
returns nothingHow do I reconnect and push the local git to the existing GitHub remote without losing the new local branch with it's commits?
Add the remote:
git remote add origin http://github.com/user/repo.git
Then push the changes.