更漂亮的日志
要在更漂亮的图形结构中查看日志,请使用:
git log --decorate --oneline --graph
样本输出:
* e0c1cea (HEAD -> maint, tag: v2.9.3, origin/maint) Git 2.9.3
* 9b601ea Merge branch 'jk/difftool-in-subdir' into maint
|\
| * 32b8c58 difftool: use Git::* functions instead of passing around state
| * 98f917e difftool: avoid $GIT_DIR and $GIT_WORK_TREE
| * 9ec26e7 difftool: fix argument handling in subdirs
* | f4fd627 Merge branch 'jk/reset-ident-time-per-commit' into maint
...
由于它是一个非常大的命令,你可以分配一个别名:
git config --global alias.lol "log --decorate --oneline --graph"
要使用别名版本:
# history of current branch :
git lol
# combined history of active branch (HEAD), develop and origin/master branches :
git lol HEAD develop origin/master
# combined history of everything in your repo :
git lol --all