问题描述
我使用GfW意外创建了一个分支,其名称以<U+0096>
开头,这似乎是一个Unicode控制字符。
$ git branch
features/#72_some_branch
* features/#73_another_branch
master
<U+0096>features/#73_another_branch
现在,为了纠正此错误,我需要知道如何在git bash中对其进行转义。我尝试使用众所周知的Alt + Num组合键,但这没用。
解决方法
我必须承认,答案很明显。使用bash shell的内置echo
命令,我可以插入所需的符号:
git branch -d "$(echo -e '\u0096')features/#73_another_branch"