Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux Git:Git分支名称“末尾的额外字符是什么?”;?[m";?_Linux_Git_Git Bash - Fatal编程技术网

Linux Git:Git分支名称“末尾的额外字符是什么?”;?[m";?

Linux Git:Git分支名称“末尾的额外字符是什么?”;?[m";?,linux,git,git-bash,Linux,Git,Git Bash,无法删除所有本地分支。 结尾追加了一些特殊字符,git抛出以下错误: git branch | grep -v "develop" | xargs git branch -D error: branch 'anjum_br?[m' not found. error: branch 'deploy_doc?[m' not found. error: branch 'deploy_doc_fix?[m' not found. 我建议您运行git branch | grep-v“develope”

无法删除所有本地分支。 结尾追加了一些特殊字符,git抛出以下错误:

git branch | grep -v "develop" | xargs git branch -D

error: branch 'anjum_br?[m' not found.
error: branch 'deploy_doc?[m' not found.
error: branch 'deploy_doc_fix?[m' not found.

我建议您运行
git branch | grep-v“develope”| od-xcb
,以更好地表示您所看到的内容。
ESC[m
(相当于
ESC[0m
)是重置图形格式副本(着色和其他属性)的终端序列

你要找的东西是十六进制
1b
或八进制
033

如果是这种情况,很可能有什么东西正在拦截您的流并将这些转义序列注入其中。最有可能的原因是您的
颜色.ui
被设置为
始终
,如我设置该标志时下面的转储所示:

0000340    6d5b    200a    6d20    7361    6574    1b72    6d5b    000a
          [   m  \n           m   a   s   t   e   r 033   [   m  \n
        133 155 012 040 040 155 141 163 164 145 162 033 133 155 012
在这种情况下,您可以在输出流中看到转义序列
033[m
。如果检测到输出发送到终端,则将该标志设置为
auto
应使用颜色,否则不使用颜色:

git config --global color.ui auto

如果将
替换为ESC键(0x1b),则看起来很像vt100转义序列。检查git颜色设置。理论上是“自动”当你在PipingTanks@paxdiablo时,模式应该是关闭的。的确,这就是问题所在,在将其设置为自动后,问题得到了解决。@KarthikV,所以这可能是一个很好的理由来投票/接受答案,是吗?:-)啊!我昨天忘了打开我的
总是
设置,今天早上,我得到了
致命:refspec I的远程部分使用我的脚本推送时,[32mpax-adb9999-fix-device-using-stale-data?[m
中的名称无效。可以确认我的答案并修复此问题:-)