2 title: Git log format string
8 - "git log --pretty=format:%H"
21 git log --pretty="format:%H"
24 See the next tables on format variables.
30 | Variable | Description |
32 | `%H` | commit hash |
33 | `%h` | (abbrev) commit hash |
37 | Variable | Description |
40 | `%t` | (abbrev) tree hash |
44 | Variable | Description |
46 | `%P` | parent hash |
47 | `%p` | (abbrev) parent hash |
51 | Variable | Description |
53 | `%s` | commit subject |
54 | `%f` | commit subject, filename style |
55 | `%b` | commit body |
60 ## Author and committer
66 | Variable | Description |
69 | `%aN` | author, respecting mailmap |
73 | Variable | Description |
75 | `%ae` | author email |
76 | `%aE` | author email, respecting mailmap |
80 | Variable | Description |
82 | `%aD` | author date (rfc2882) |
83 | `%ar` | author date (relative) |
84 | `%at` | author date (unix timestamp) |
85 | `%ai` | author date (iso8601) |
91 | Variable | Description |
93 | `%cn` | committer name |
94 | `%cN` | committer name, respecting mailmap |
98 | Variable | Description |
100 | `%ce` | committer email |
101 | `%cE` | committer email, respecting mailmap |
105 | Variable | Description |
107 | `%cD` | committer date (rfc2882) |
108 | `%cr` | committer date (relative) |
109 | `%ct` | committer date (unix timestamp) |
110 | `%ci` | committer date (iso8601) |
114 - [Git log cheatsheet](./git-log)