git log 格式化

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

设置长期的alias

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显示带格式的git log输出了。

git log的参数配置可以看这个:
https://blog.csdn.net/rd_w_csdn/article/details/113951204

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注

滚动至顶部