Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Lam
Lam

Posted on

     

Git Log Format String Cheat Sheet

Also see

[Author and committer] Committer

Name

VariableDescription
%cncommitter name
%cNcommitter name, respecting mailmap

Email

VariableDescription
%cecommitter email
%cEcommitter email, respecting mailmap

Date

VariableDescription
%cDcommitter date (rfc2882)
%crcommitter date (relative)
%ctcommitter date (unix timestamp)
%cicommitter date (iso8601)

[Author and committer] Author

Name

VariableDescription
%anauthor
%aNauthor, respecting mailmap

Email

VariableDescription
%aeauthor email
%aEauthor email, respecting mailmap

Date

VariableDescription
%aDauthor date (rfc2882)
%arauthor date (relative)
%atauthor date (unix timestamp)
%aiauthor date (iso8601)

[Log format] Commit

VariableDescription
%scommit subject
%fcommit subject, filename style
%bcommit body
------
%dref names
%eencoding

[Log format] Hash

Commit

VariableDescription
%Hcommit hash
%h(abbrev) commit hash

Tree

VariableDescription
%Ttree hash
%t(abbrev) tree hash

Parent

VariableDescription
%Pparent hash
%p(abbrev) parent hash

[Log format] Pretty format

git log--pretty="format:%H"
Enter fullscreen modeExit fullscreen mode

See the next tables on format variables.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Code and make art
  • Joined

More fromLam

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp