I have a local repo which was linked to a old remote repo. I made a new repo on GitHub and ran this in the folder
git remote set-url origin <new repo url>
where the url is the new repo. Then I ran
git push -u origin master
Which pushed everything to my new repo. If I run
git remote -v
I get the correct repo location. But vscode does not seem to recognize the repo. It is saying the folder currently open does not have a git repo. Why is this? I tried running git init which prints
Reinitialized existing Git repository in <folder name/.git/>
But this doesn't do anything?
What can I do to make vscode's source control see my repo again? I have uncommited code, so not everything is pushed so I can't simply clone the repo.
Edit:
When I try to commit I get the following error
$ git commit -a -m "Renamed the repo"
fatal: this operation must be run in a work tree