带有附加信息的Git日志修饰图
那么git log命令带有附加信息的Git日志修饰图,git,Git,那么git log命令 git log --graph --decorate --pretty=oneline --abbrev-commit 给我看了一张很好的图表。 请注意,上面的git命令将自动美丽的颜色应用于“(refs/heads/、refs/tags/和refs/remotes/)零件 我希望我可以附加现有格式: *<abbrevated commit> (refs/heads/, refs/tags/ and refs/remotes/) <commit me
git log --graph --decorate --pretty=oneline --abbrev-commit
给我看了一张很好的图表。
请注意,上面的git命令将自动美丽的颜色应用于“(refs/heads/、refs/tags/和refs/remotes/)零件
我希望我可以附加现有格式:
*<abbrevated commit> (refs/heads/, refs/tags/ and refs/remotes/) <commit message>
*(refs/heads/、refs/tags/和refs/remotes/)
尾随
<relative date> <Vorname nachname>
最后看起来
*<abbrevated commit> (refs/heads/, refs/tags/ and refs/remotes/)* <commit message> <relative date> <Vorname nachname>
*(refs/heads/、refs/tags/和refs/remotes/)*
我试过命令:
git log --graph\n--pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\n--abbrev-commit --date=relative
git log--graph\n--pretty=格式:'%Cred%h%Creset-%C(黄色)%d%Creset%s%Cgreen(%cr)%C(粗体蓝色)%Creset'\n--abbrev commit--date=relative
这给了我相同的内容,但自动颜色现在不应用于%d参数。现在,如果我不强制使用黄色,则应用“重置”颜色
简单来说,我希望如下所示(编辑图像以显示演示)
请给出您的建议。像这样包装
%d
:
%C(auto)%d%Creset
实现装饰自动着色
自动着色取决于git版本>=1.8.3:它不起作用,它说:致命:变量的颜色值“auto”不好--pretty format“Ok发现,auto可能只来自git版本:git 1.8.3oh有趣!您对此有参考资料吗?请参考下面的链接,即“UI、工作流和功能”部分的第5点