在git安装目录下的.gitconfig文件中编辑
[color]
diff = auto
status = auto
branch = auto
interactive = true
ui = true
[alias]
hist = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
[core]
autocrlf = false测试:
打开bash,进入目录下,输入:git hist即可看到效果
本文介绍如何通过编辑.gitconfig文件来美化Git命令行的历史记录显示样式,包括颜色、图形等元素,使得历史记录更加直观易读。

516

被折叠的 条评论
为什么被折叠?



