查看历史提交 git log
user@user-PC:~/Desktop/资料/git$ git log
commit b36771713faa495557813edeaf8845c03d51f951 #commitid
Author: woms <[email protected]> #提交人
Date: Sun Jun 18 22:30:38 2017 +0800 #提交时间
- -p 显示提交差异
- -2显示最近两次提交
- --pretty=oneline 简略显示也可以使用--oneline
- --since=1.day 限制时间
- -Sfunction_name 涉及到function_name中的提交
- --graph 显示图形
git log --oneline --graph
* dc9f538 合并了master
|\
| * eee1273 添加了333
* | fc8f413 添加了2222222
|/
* d0ada33 111
* 3118b36 init
在网上找了一个配置的比较号的模板选项
git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit