Couldn't delete branches with # in name
erkage opened this issue · comments
i have branches with ticket numebrs in it so like:
#345 - escape hashmark in branchname before delete
Got this error for them:
ERROR: Unable to remove: Command failed: git branch -D #345---escape-hashmark-in-branchname-before-delete fatal: branch name required
So #
should escape with \
so the working command is:
git branch -D \#345---escape-hashmark-in-branchname-before-delete
I don't know are there any similiar charater that should be escaped before deleting.
Ohh, find a better way, put between '
:
git branch -D '#345---escape-hashmark-in-branchname-before-delete'