如何删除名称以 unicode 字符开头的 git 分支?

mju*_*mju 6 git git-bash git-for-windows

使用 GfW 我意外地创建了一个名称以 开头的分支<U+0096>,这似乎是一个 unicode 控制字符。

$ git branch
  features/#72_some_branch
* features/#73_another_branch
  master
  <U+0096>features/#73_another_branch
Run Code Online (Sandbox Code Playgroud)

现在,为了纠正这个错误,我需要知道如何在 git bash 中转义它。我尝试使用众所周知的 Alt+Num 组合键,但这不起作用。

mju*_*mju 8

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

git branch -d "$(echo -e '\u0096')features/#73_another_branch"
Run Code Online (Sandbox Code Playgroud)