I’ve been using Dropbox to keep my source folder synced between two computers. This folder contains my source-code which I version handle with Git.
it seems that there was a file conflict and when I did a push, my Git client, pushed an invalid branch to the remote. The branch name is rel_1 (Mridang-PC's conflicted copy 2011-09-16).0-alpha2. I need to delete this branch but an unable to do so. Ad you can see the name has spaces and single-quote too.
When I try and check out the branch by running: git checkout "rel_1 (Mridang-PC's conflicted copy 2011-09-16).0-alpha2". I get an error saying: fatal: git checkout: we do not like 'rel_1 (Mridang-PC's conflicted copy 2011-09-16).0-alpha2' as a branch name.
Is there a way I can fix this?
Thanks.
Look in the folder “.git/refs/heads”, you will find the file which has that branch name.
(By the way, the branch was renamed that way by Dropbox).
Rename that file, and you should be fine.