【Git系列】Git log命令详解

git log命令详解

git log -p -2 展示最近两次提交历史记录,并且包含git diff差异信息
git log --stat 简要展示提交变化/受影响的行数
git log --pretty=oneline pretty可选的项比较多比如short/full/fuller等
git log --pretty=format:"%h - %an, %ar : %s"
format可以定制要显示的记录格式
git log --pretty=format:"%h - %an, %ar : %s" --graph
# 用到了pretty格式化,另外检索author=huxiusong以及自since=2010-10-10开始,在before=2015-10-10之前提交历史。
git log --pretty="%h - %s" --author=huxiusong --since="2010-10-10" --before="2015-10-10"

posted on 2017-01-15 14:46  pinefantasy  阅读(561)  评论(0编辑  收藏  举报

导航