Visual Studio 2022 (17.5.3) won't let me delete a local branch because it still thinks it is checked out in a local reposititory. However that repository does not exist anymore, the whole folder is gone. I deleted it and didn't think about the branch. The repository also doesn't show up in Visual Studio anymore. Except for the error message.
How can I fix this? Is there any other hidden or temp directory where Visual Studio stores the info? Is there any command I can run?
I tried various, even recreated the folder but ovbiously git fails because it doesnt detect any repository anymore, since the files are gone...
Turned out there was still a worktree configured, that prevented it from deleting.