GIT-LOG(1) GIT-LOG(1) (NAME) git-log - (SYNOPSIS) git log [] [] [[--] ...] (DESCRIPTION) . (parent) () ^ . . . ^ . . . : $ git log foo bar ^baz : << foo bar baz >>. ".." "^ " . : $ git log origin..HEAD $ git log HEAD ^origin "..." . . : $ git log A B --not $(git merge-base --all A B) $ git log A...B git-rev-list(1) git- diff(1) . (OPTIONS) --follow ( ). --no-decorate, --decorate[=(short|full|auto|no)] (ref) . : short refs/heads/, refs/tags/ refs/remotes/ . full ( ) . auto short . --decorate --decorate=short . log.decorate auto . --decorate-refs=, --decorate-refs-exclude= --decorate-refs-exclude --decorate-refs () . log.excludeDecoration --decorate-refs log.excludeDecoration . HEAD, refs/heads/, refs/remotes/, refs/stash/, refs/tags/ . --clear-decorations --decorate-refs --decorate-refs-exclude . log.initialDecorationSet all . --source . --mailmap, --no-mailmap, --use-mailmap, --no-use-mailmap mailmap . git-shortlog(1) . --full-diff git log -p ... . "..." . --stat . --log-size log size . git log . -L,:, -L:: ,, . . ( ) . . --patch . --no-patch . --raw, --name-only, --name-status, --summary . (--stat, --numstat, --shortstat, --dirstat) . --word-diff, --color-moved, --no-prefix, (-w, -b) (-S, -G) --diff-filter. : o ( 1 ). o // POSIX . -L ( ) . ^// . . o + - . : . : -L ( ) . ^: . git diff (patch hunk headers) ( Defining a custom hunk-header gitattributes(5) ). . HEAD ( ). origin..HEAD ( HEAD) origin . , Specifying Ranges gitrevisions(7) . [--] ... . History Simplification . -- . (Commit Limiting) . ( --since= --grep= ) . --reverse . -, -n , --max-count= . --max-count-oldest= . --skip= . --since=, --after= . today . --since-as-filter= . , . --until=, --before= . --author=, --committer= / . --author=, ( --committer=). --grep-reflog= . --grep-reflog, . --walk-reflogs . --grep= . --grep=, ( --all-match ). --notes . --all-match --grep . --invert-grep --grep= . -i, --regexp-ignore-case . --basic-regexp (Basic Regular Expressions) . -E, --extended-regexp (Extended Regular Expressions) . -F, --fixed-strings ( ). -P, --perl-regexp (Perl-compatible regular expressions) . . . --remove-empty . --merges . --min-parents=2 . --no-merges . --max-parents=1 . --min-parents=, --max-parents=, --no-min-parents, --no-max-parents ( ) . --max-parents=1 --no-merges, --min-parents=2 --merges . --max-parents=0 --min-parents=3 (octopus merges) . --no-min-parents --no-max-parents ( ) . --min-parents=0 ( ) --max-parents=-1 ( ). --first-parent . (topic branch) . first-parent --diff-merges=first-parent . --exclude-first-parent-only ( ^), . . --maximal-only . --not ^ ( ) --not . --stdin stdin . . --all refs/, HEAD, . --branches[=] refs/heads . (shell glob) . ?, *, [ /* . --tags[=] refs/tags . . ?, *, [ /* . --remotes[=] refs/remotes . . ?, *, [ /* . --glob= . refs/ . ?, *, [ /* . --exclude= --all, --branches, --tags, --remotes, --glob . --all, --branches, --tags, --remotes, --glob ( ). --branches, --tags, --remotes refs/heads, refs/tags, refs/remotes --glob --all refs/ . /* . --exclude-hidden=(fetch|receive|uploadpack) git-fetch, git-receive-pack git-upload-pack fetch.hideRefs, receive.hideRefs uploadpack.hideRefs transfer.hideRefs ( git-config(1) ). --all --glob . --reflog . --alternate-refs . objects/info/alternates . core.alternateRefsCommand . git-config(1) . --single-worktree ( git-worktree(1) ): --all, --reflog --indexed-objects. . --ignore-missing . --bisect refs/bisect/bad --not refs/bisect/good-* . --stdin . --all --glob= . -- . --not . --cherry-mark --cherry-pick ( ) = + . --cherry-pick << >> . A B --left-right ( --left-right ). (cherry- pick) ( << b>> A ). . --left-only, --right-only < > --left-right . --cherry-pick --right-only A...B B A A . + git cherry A B . --cherry-pick --right-only --no-merges . --cherry --right-only --cherry-mark --no-merges; git log --cherry upstream...mybranch, git cherry upstream mybranch. -g, --walk-reflogs . ( ^, .., ... ). --pretty oneline reference ( ) . ref@{} ( ) ref@{} ( ) : 1. ref@{} . 2. ref@{now} . 3. --date --date . 4. . --pretty=oneline, . --reverse . git-reflog(1) . --pretty=reference, . --merge HEAD... MERGE_HEAD, CHERRY_PICK_HEAD, REVERT_HEAD REBASE_HEAD . . - . --boundary . - . (History Simplification) . : . : . --simplify-by-decoration . . : (Default mode) . ( ) . --show-pulls TREESAME TREESAME . << >> . --full-history . --dense . --sparse . --simplify-merges --full-history . --ancestry-path[=] ( .. ^), , , . ( ) . . . foo . foo !TREESAME ( ) TREESAME ( ) . ( diff foo .) . foo : .-A---M---N---O---P---Q / / / / / / I B C D E Y \ / / / / / `-------------' X A---Q . : o I foo asdf quux quux . I !TREESAME . o A, foo foo . o B A . M (trivial) TREESAME . o C foo N foobar TREESAME . o D foo baz . O N D foobarbaz TREESAME . o E quux xyzzy P quux xyzzy . P O TREESAME E . o X side Y . Y X TREESAME . Q side P Q P TREESAME Y . rev-list --full-history / ( --parents --children) . . (Default mode) TREESAME ( --sparse ). TREESAME . ( TREESAME .) . : .-A---N---O / / / I---------D TREESAME ( ) B . C N TREESAME . I !TREESAME . / --parents . --full-history : TREESAME . ! : I A B N D O P Q M TREESAME . E, C B B !TREESAME . / . --full-history !TREESAME ( --sparse ). . : . : .-A---M---N---O---P---Q / / / / / I B / D / \ / / / / `-------------' --full-history . E TREESAME P E I . C N, X, Y Q . TREESAME : --dense TREESAME . --sparse . --full-history, : TREESAME . --simplify-merges --full-history ( ). C C' : o C' C . o P C' P' . TREESAME TREESAME . o C' ( ) !TREESAME . . --full-history . : .-A---M---N---O / / / I B D \ / / `---------' N, P, Q --full-history : o N's I M . N !TREESAME . o P's I . P TREESAME . o Q's Y X . X TREESAME . Q TREESAME . : --ancestry-path[=] , , . : D---E-------F / \ \ B---C---G---H---I---J / \ A-------K---------------L--M D..M M D . M D << M D >>. A B ( D). M D D..M D C K. --ancestry-path . D..M : E-------F \ \ G---H---I---J \ L--M --ancestry-path=D --ancestry-path D..M . D..M . --ancestry-path=H D..M : E \ C---G---H---I---J \ L--M --ancestry-path=K D..M : K---------------L--M --show-pulls, . . --full-history --simplify-merges : .-A---M-----C--N---O---P / / \ \ \/ / / I B \ R-'`-Z' / \ / \/ / \ / /\ / `---X--' `---Y--' I file.txt A, B, X . C, Z, Y file.txt . M A B TREESAME . R file.txt M file.txt X . R X TREESAME M . N file.txt R N R TREESAME C . O P TREESAME Z Y TREESAME . N R TREESAME . : I---X --full-history, . A B M O P . : .-A---M--------N---O---P / / \ \ \/ / / I B \ R-'`--' / \ / \/ / \ / /\ / `---X--' `------' O P file.txt . file.txt . : --full-history . --simplify-merges, O P . O P . TREESAME . N : .-A---M--. / / \ I B R \ / / \ / / `---X--' A, B, X . M R . A B << >> . . . --simplify-merges . . (auditing) . . R . N R X . X A B . --show-pulls TREESAME TREESAME . --show-pulls <<>> (pull) . --show-pulls ( ) : I---X---R---N R N X R . A B . --show-pulls --simplify-merges : .-A---M--. N / / \ / I B R \ / / \ / / `---X--' M R N M . N R <<>> . --simplify-by-decoration . !TREESAME ( ) () () . TREESAME ( ). (Commit Ordering) . --date-order . --author-date-order . --topo-order . : ---1----2----4----7 \ \ 3----5----6----8--- git rev-list --date-order : 8 7 6 5 4 3 2 1. --topo-order, 8 6 5 3 7 4 2 1 ( 8 7 4 2 6 5 3 1) . --reverse ( Commit Limiting ) . --walk-reflogs . (Object Traversal) . --no-walk[=(sorted|unsorted)] . . unsorted . ( sorted ) . --graph . --do-walk --no-walk . (Commit Formatting) --pretty[=], --format= oneline, short, medium, full, fuller, reference, email, raw, format: tformat: . % --pretty=tformat: . <> . = medium . ( git-config(1) ). --abbrev-commit . --abbrev= ( diff ) . --pretty=oneline . --no-abbrev-commit . --abbrev-commit --oneline . log.abbrevCommit . --oneline --pretty=oneline --abbrev-commit . --encoding= encoding . (non- plumbing) UTF-8 . X X . iconv(3) . --expand-tabs=, --expand-tabs, --no-expand-tabs ( ). --expand-tabs --expand-tabs=8, --no-expand-tabs --expand-tabs=0 . ( medium full, fuller) . --notes[=] ( git-notes(1) ) . git log, git show git whatchanged --pretty, --format, --oneline . core.notesRef notes.displayRef ( ) . git-config(1) . , . refs/notes/ notes/ refs/ refs/notes/ . --notes . : "--notes=foo" refs/notes/foo "--notes=foo --notes" "refs/notes/foo" () . --no-notes . --notes . "--notes --notes=foo --no-notes --notes=bar" refs/notes/bar . --show-notes-by-default . --show-notes[=], --standard-notes, --no-standard-notes . --notes/--no-notes . --show-signature gpg --verify . --relative-date --date=relative . --date= --pretty . log.date --date log . ( ) . -local ( iso-local), . --date=relative << >>. -local --date=relative . --date=local --date=default-local . --date=iso ( --date=iso8601) ISO 8601 . ISO 8601 : o / T o o --date=iso-strict ( --date=iso8601-strict) ISO 8601 . --date=rfc ( --date=rfc2822) RFC 2822 . --date=short YYYY-MM-DD . --date=raw (1970-01-01 00:00:00 UTC) UTC ( + - ) . strftime("%s %z") . -local ( UTC ) . --date=human ( <<>> ). . --date=unix ( ) . --raw, UTC -local . --date=format: strftime %s, %z, %Z . --date=format:%c / (locale) . strftime(3) . -local, --date=format-local: . --date=default ctime(3) . -- "HH:MM:SS" : Thu Jan 1 00:00:00 1970 +0000. --parents ( "commit parent..."). History Simplification . --children ( "commit child..."). History Simplification . --left-right . < > . --boundary - . : y---b---b branch B / \ / / . / / \ o---x---a---a branch A : $ git rev-list --left-right --boundary --pretty=oneline A...B >bbbbbbb... 3rd on b >bbbbbbb... 2nd on b . . --no-walk . History Simplification . --topo-order --date-order . --show-linear-break[=] --graph (flatten) . (barrier) . . --graph-lane-limit= --graph (lanes) . ~ . 0 ( ) . (PRETTY FORMATS) oneline, email raw Author: . "Merge: " . ( ) . pretty. format: ( git-config(1) ). : oneline . short commit Author: medium commit Author: Date: full commit Author: Commit: fuller commit Author: AuthorDate: Commit: CommitDate: reference (, ) --pretty='format:%C(auto)%h (%s, %ad)' . --date=short --date . format: --decorate --walk-reflogs . email From From: Date: Subject: [PATCH] mboxrd email "From " ( ">" ) ">" . raw raw . --abbrev --no-abbrev parents (grafts) . diff ( git log --raw) . --no-abbrev . format: format: . printf %n \n . format:"The author of %h was %an, %ar%nThe title was >>%s<<%n" : The author of fe6e0ee was Junio C Hamano, 23 hours ago The title was >>t4119: test autocomputing -p for traditional diff input.<< (placeholders) : o (literal) : %n (newline) %% % %x00 %x ( << >> ). o : %Cred %Cgreen %Cblue %Creset %C() Values "CONFIGURATION FILE" git-config(1). ( color.diff, color.ui, --color, auto ). %C(auto,) ( %C(auto,red)). %C(always,) ( --color=always ). auto ( %C(auto)) . %m (<) (>) (-) %w([[,[,]]]) (line wrapping) -w git-shortlog(1). %<([,(trunc|ltrunc|mtrunc)]) N . (..) (ltrunc) ..ft, (mtrunc) mi..le, (trunc) rig.. . : >= 2 . : ( ) . : . : (padding) . %<|( ) - . . %>(), %>|() %<() %<|() . %>>(), %>>|() %>() %>|() . %><(), %><|() %<() %<|() ( ). o : %H %h %T %t %P %p %an %aN ( .mailmap git-shortlog(1) git-blame(1) ) %ae %aE ( .mailmap git-shortlog(1) git-blame(1) ) %al ( @) %aL ( %al ) .mailmap ( git-shortlog(1) git-blame(1) ) %ad ( --date= ) %aD RFC2822 %ar %at UNIX %ai ISO 8601 %aI ISO 8601 %as (YYYY-MM-DD) %ah ( --date=human git-rev-list(1)) %cn () %cN ( .mailmap git-shortlog(1) git-blame(1) ) %ce %cE ( .mailmap git-shortlog(1) git-blame(1) ) %cl ( @) %cL ( %cl ) .mailmap ( git-shortlog(1) git-blame(1) ) %cd ( --date= ) %cD RFC2822 %cr %ct UNIX %ci ISO 8601 %cI ISO 8601 %cs (YYYY-MM-DD) %ch ( --date=human git-rev-list(1)) %d --decorate git-log(1) %D " (" ")" %(count) . --commit-list-format format-patch . %(total) . --commit-list-format format-patch . %(decorate[: