Reputation: 431
I Accidentally created a git branch, which contain '()' in branch name. I didn't get any error while creating the branch. But when i tried to git checkout to the branch from master, i got the following error.
-bash: syntax error near unexpected token `('
I tried renaming the branch with git branch -m and git branch -m -f but both commands returned the same error as given above.
How can i solve this situation ? Is there any method to get the changes i made in that branch??
Thanks in advance
Upvotes: 3
Views: 3957
Reputation: 76
Try git checkout "branchname"
example If branchname is abcd()
git checkout "abcd()"
Upvotes: 6