1

使用 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 组合键,但没有奏效。

4

1 回答 1

3

我不得不承认,答案很明显。使用 bash shell 的内置echo命令,我能够插入所需的符号:

git branch -d "$(echo -e '\u0096')features/#73_another_branch"
于 2020-09-02T11:32:33.430 回答