Git日志格式、颜色设置

> git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"

效果图:

Git日志格式、颜色设置_第1张图片

 

把上面命令设置一个别名lg

> git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"

 

git lg

 

即可,且不修改原来的log命令。

 

more info

> git lg -p

or

> git log -p

你可能感兴趣的:(git)