Following up on '<Branch>' is already checked out at '</other/location>' in git worktrees
I'm getting the "Branch is already checked out at different worktree" error when my branch and worktree mismatched:
I have to use git worktree remove to remove my 1.2T worktree for now, but I'd like to know what's the best way to fix it in the future.
I have branch and worktree setup like the following:
/path/mastercorresponds to my gitmasterbranch/path/release-acorresponds to my gitrelease-abranch/path/release-bcorresponds to my gitrelease-bbranch
So on and so forth. I had it like that for years, until a few days ago I click and change a worktree branch in MS VS by mistake. Now my branch and worktree is like this:
/path/release-ais using my gitrelease-bbranch/path/release-bis using my gitrelease-bbranch
Now I cannot change it back in MS VS. Trying to switch branch within the worktree will get me:
fatal: '<branch>' is already checked out at '</other/location>'
Any better way other than git worktree remove please.