我在 Windows 7
上使用了 git-bash
,我在做
git log
在每个提交的 sha-1 附近,在其准确的情况下提到了本地或远程分支。
在我必须进行rebase -i
时,选择良好的提交ID来汇总我本地分支之前,这确实很有用。
现在到Debian 9
,我不需要安装git-bash
。但是,git log
不再提到我的提交ID的分支机构。这是git-bash
的git log
命令的特殊自定义,我可以重现?
谢谢
您可能需要使用--decorate
选项。来自man git-log
:
--no-decorate, --decorate[=short|full|auto|no]
Print out the ref names of any commits that are shown. If short is specified, the ref name prefixes refs/heads/, refs/tags/ and refs/remotes/
will not be printed. If full is specified, the full ref name (including prefix) will be printed. If auto is specified, then if the output is
going to a terminal, the ref names are shown as if short were given, otherwise no ref names are shown. The default option is short.
我还必须提到,在我的Git版本(2.20.1(上,分支将自动显示使用git log
。您使用哪个版本的git?