当我运行git rebase -i
时,我得到了ansi颜色代码,显示在常规的todo列表(任何repos,任何编辑器)之后,它们是从哪里来的?
- git版本,尝试了2.13和2.15,我对我的用户设置进行了测试
color.ui
和color.interactive
都是false。- 在git config(
core.editor
)中尝试了vim,nano,subl和ed
,都有这个问题
谢谢大家。
pick 5c0cbe059d56e2fe2bac4bf9e3373d5882157f4a commit
[38;5;252m# Rebase b4c6863..5c0cbe0 onto b4c6863 (1 command)[39m
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# d, drop = remove commit
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
1条答案
按热度按时间o2gm4chl1#
好的,我设法解决了这个问题,这是因为我在我的
$PATH
中创建了一个自定义cat
,它的内容是:基本上它使用
pygmentize
来突出显示语法,我猜git
使用cat
来生成rebase todo列表,因此我的自定义cat
污染了git输出。要解决这个问题,只需将自定义
cat
重命名为其他名称。