Git log 相关小技巧

79 阅读1分钟

基础

正常来说,我们都是使用下面这个命令

git log

进阶

非常的清晰

git log --graph --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%an%C(reset)%C(bold yellow)%d%C(reset) %C(dim white)- %s%C(reset)' --all

image.png

高级

查看对应的某一条

git show <commit> --stat

image.png

查看具体的某个文件

git show <commit> -- <filepath>

image.png