原文地址为:
git log格式化日志
%H 提交对象(commit)的完整哈希字串
%h 提交对象的简短哈希字串
%T 树对象(tree)的完整哈希字串
%t 树对象的简短哈希字串
%P 父对象(parent)的完整哈希字串
%p 父对象的简短哈希字串
%an 作者(author)的名字
%ae 作者的电子邮件地址
%ad 作者修订日期(可以用-date= 选项定制格式)
%ar 作者修订日期,按多久以前的方式显示
%cn 提交者(committer)的名字
%ce 提交者的电子邮件地址
%cd 提交日期
%cr 提交日期,按多久以前的方式显示
%s 提交说明
转载请注明本文地址: git log格式化日志
git log --pretty=format:"arg"
%H 提交对象(commit)的完整哈希字串
%h 提交对象的简短哈希字串
%T 树对象(tree)的完整哈希字串
%t 树对象的简短哈希字串
%P 父对象(parent)的完整哈希字串
%p 父对象的简短哈希字串
%an 作者(author)的名字
%ae 作者的电子邮件地址
%ad 作者修订日期(可以用-date= 选项定制格式)
%ar 作者修订日期,按多久以前的方式显示
%cn 提交者(committer)的名字
%ce 提交者的电子邮件地址
%cd 提交日期
%cr 提交日期,按多久以前的方式显示
%s 提交说明
本文出自 追趣,转载时请注明出处及相应链接
以下是我个人比较喜欢使用的git命令的别名命令:
1.status -- st
git config --global alias.st status
2.commit -- ci
git config --global alias.ci commit
3.branch -- br
git config --global alias.br branch
4.checkout -- co
git config --global alias.co checkout
5.日志输出 mglog
git config --global alias.mglog "log --pretty=format: '%h %an:%ae %cr %s'"
。。。
转载请注明本文地址: git log格式化日志