git log --pretty=format 常用选项参数 【汇总】

发布时间 2023-07-09 10:27:34作者: 悟透

--pretty=format 常用选项 [注]

选项 说明 速记
%H 提交的完整哈希值 commit hash
%h 提交的简写哈希值 Abbreviated commit hash
%T 树的完整哈希值 tree hash
%t 树的简写哈希值 Abbreviated tree hash
%P 父提交的完整哈希值 Parent hashes
%p 父提交的简写哈希值 Abbreviated parent hashes
%an 作者名字 author name
%ae 作者的电子邮件地址 author email
%ad 作者修订日期 author date
%ar 作者修订日期,按多久以前的方式显示 author date, relative
%cn 提交者的名字 committer name
%ce 提交者的电子邮件地址 committer email
%cd 提交日期 committer date
%cr 提交日期,按多久以前的方式显示 committer date, relative
%s 提交说明 subject