Title: Theory / Important / CS / Softw / VCS / Git / Log
Tags: fromMath mathToDef computer_to_instruction hasNotNewEffectReturnsMeaning FromInstruction some_instruction fromCommand fromCommandLine instruction_to_flag

Fla: log
Effect: List the recent commit, with author, date, hash, and commit message
Prefix: git
Chapter: 2
Section: 3

Fla: -p
Prefix: git log
Chapter: 2
Section: 3
Print: displays the patch in each commit

Fla: --stat
Effect: Add, to the log, the list of edited files, with number of added/removed lines
Prefix: git log
Chapter: 2
Section: 3

Fla: --decorate
Effect: Show where the branch pointers are pointing
Prefix: git log
Chapter: 3
Section: 1
Default: log.decorate

Fla: --abbrev-commit
Effect: Show on each entry shown the shortest hash which can be used to denote this hash
Page: https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection
Prefix: git log
Chapter: 7
Section: 1

Fla: reflog
Page: https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection
Prefix: git
Chapter: 7
Section: 1
Print: a log of where your HEAD and branch references have been for the last few months.
734713b HEAD@{0}: commit: Fix refs handling, add gc auto, update tests
d921970 HEAD@{1}: merge phedders/rdocs: Merge made by the 'recursive' strategy.
1c002dd HEAD@{2}: commit: Add some blame and merge stuff
1c36188 HEAD@{3}: rebase -i (squash): updating HEAD
95df984 HEAD@{4}: commit: # This is a combination of two commits.
1c36188 HEAD@{5}: rebase -i (squash): updating HEAD
7e05da5 HEAD@{6}: rebase -i (pick): updating HEAD

Fla: -g
Effect: show reflog value in the log
Page: https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection
Prefix: git log
Chapter: 7
Section: 1
Extra: reflog: a log of where your HEAD and branch references have been for the last few months.

Question: How to find object from a deleted branch/commit
Answer: use reflog to find recent commit
Page: https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery
Chapter: 10
Section: 7
Answer2: use fsck --full to find dangling object

Fla: --pretty=oneline
Effect: Limit logs to a one line description: sha-1 and header of commit message
Page: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
Prefix: git log
Chapter: 2
Section: 3
Variables: n a number

Fla: Makes log short
Effect: --pretty=short
Page: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
Prefix: git log
Chapter: 2
Section: 3
Variables: n a number

Fla: Makes each log contains most relevant information
Effect: --pretty=full
Page: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
Prefix: git log
Chapter: 2
Section: 3
Variables: n a number

Fla: each log display more information than full
Effect: --pretty=fuller
Page: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
Prefix: git log
Chapter: 2
Section: 3
Variables: n a number

Fla: Each log follow format foo
Effect: --pretty=format:"foo"
Page: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
Prefix: git log
Chapter: 2
Section: 3
Variables: n a number

Fla: --shortstat
Effect: Display only the changed/insertions/deletions line from the --stat command.
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3

Fla: --name-only
Effect: Show the list of files modified after the commit information.
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3

Fla: --name-status
Effect: Show the list of files affected with added/modified/deleted information as well.
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3

Fla: --relative-date
Effect: Display the date in a relative format (for example, “2 weeks ago”) instead of using the full date format.
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3

Fla: --graph
Effect: Display an ASCII graph of the branch and merge history beside the log output.
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3

Fla: --oneline
Effect: Shorthand for --pretty=oneline --abbrev-commit
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3

Fla: --since=timeSpecification
--after=timeSpecification
Effect: Limit log to commits done since timeSpecification
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3

Fla: --until=timeSpecification
--before=timeSpecification
Effect: show logs until timeSpceification
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3

Fla: --author=author
Effect: Limit displaied log to the one by author
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3

Fla: --grep=foo
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3
Print: Limit commit displayed to the one containing foo in commit message

Fla: -- files
Effect: Limit displays to files touching one file of files
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3

Fla: -L :functionName:file
Effect: Show all changes through history done to functionName in file
Page: https://git-scm.com/book/en/v2/Git-Tools-Searching
Prefix: git log
Chapter: 7
Section: 6

Fla: --left-right foo...bar
Effect: add < before line of commit in foo and > before lines of commit in bar
< f1270f7 Update README
< 9af9d3b Create README
< 694971d Update phrase to 'hola world'
> e3eb223 Add more tests
> 7cff591 Create initial testing script
> c3ffff1 Change text to 'hello mundo'
Page: https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging
Prefix: git log
Chapter: 8

Variable: GIT_REFLOG_ACTION
Meaning: specify the descriptive text written to the reflog.
Page: https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables
Context: git
Section: 7
Chapter: 10
Kind: environment variable

Fla: --show-signature
Page: https://git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Branching-and-Merging
Prefix: git log
Chapter: A3
Section: 4
Context: git
Print: add a validation string to each commit

Fla: shortlog
Effect: same as `log` but with many options to make it short
Page: https://git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Branching-and-Merging
Prefix: git
Chapter: A3
Section: 4

Variable: .git/logs
Meaning: Records of changes made to refs
Page: https://git-scm.com/docs/gitrepository-layout
Context: git
Kind: file

Variable: .git/log/refs/heads/name
Meaning: Records all changes made to the branch tip named name.
Page: https://git-scm.com/docs/gitrepository-layout
Context: git
Kind: file

Variable: .git/logs/refs/tags/name
Meaning: Records all changes made to the tag named name.
Page: https://git-scm.com/docs/gitrepository-layout
Context: git
Kind: file

Fla: reflog exists <ref>
Effect: exits with 0 if <ref> has reflogs, 1 otherwise
Page: https://git-scm.com/docs/git-fsck
Prefix: git

Fla: reflog delete <ref>
Effect: Delete entry <ref> from reflog
Page: https://git-scm.com/docs/git-fsck
Prefix: git

Fla: reflog expire
Effect: prune older reflog entries, as described by flags
Page: https://git-scm.com/docs/git-fsck
Prefix: git

Fla: --all
Effect: process the reflogs of all references
Page: https://git-scm.com/docs/git-fsck
Prefix: git reflog expire

Fla: --expire=<time>
Effect: Prune entries older than the specified time.
Page: https://git-scm.com/docs/git-fsck
Prefix: git reflog expire
Extra: default gc.reflogExprice=90

Fla: --expire-unreachable=<time>
Effect: prune entries older than <tim€» that are not reachable from the current tip of the branch
Page: https://git-scm.com/docs/git-fsck
Prefix: git reflog expire

Fla: --updateref
Effect: Update the reference to the value of the top reflog entry (i.e. <ref>@{0}) if the previous top entry was pruned
Page: https://git-scm.com/docs/git-fsck
Prefix: git reflog expire|delete

Fla: --rewrite
Effect: If a reflog entry’s predecessor is pruned, adjust its "old" SHA-1 to be equal to the "new" SHA-1 field of the entry that now precedes it.
Page: https://git-scm.com/docs/git-fsck
Prefix: git reflog expire|delete

Fla: --stale-fix
Effect: Prune any reflog entries that point to "broken commits"
Page: https://git-scm.com/docs/git-fsck
Prefix: git reflog expire

Fla: --dry-run
Effect: Do not actually prune any entries; just show what would have been pruned.
Page: https://git-scm.com/docs/git-fsck
Prefix: git reflog expire|delete
Flag abbreviation: -n

Fla: --verbose
Effect: Print extra information on screen.
Page: https://git-scm.com/docs/git-fsck
Prefix: git reflog expire|delete

Fla: --aLogFlag
Effect: same as for log --aLogFlag
Page: https://git-scm.com/docs/git-fsck
Prefix: git reflog [show]

Name: A reflog of ref
Definition: the local "history" of ref
Page: https://git-scm.com/docs/gitglossary
Variables: ref a reference
Context: git

Fla: --follow
Effect: Continue listing the history of a file beyond renames
Page: https://git-scm.com/docs/git-worktree
Prefix: git log file

Fla: --decorate=short
Page: https://git-scm.com/docs/git-worktree
Prefix: git log file
Print: the ref name prefixes refs/heads/, refs/tags/ and refs/remotes/ will not be printed.

Fla: --decorate=full
Page: https://git-scm.com/docs/git-worktree
Prefix: git log file
Print: the full ref name (including prefix) will be printed

Fla: --source
Page: https://git-scm.com/docs/git-worktree
Prefix: git log file
Print: Print out the ref name given on the command line by which each commit was reached.

Fla: --decorate-refs=<pattern>
Effect: pretend as if all refs were included.
Page: https://git-scm.com/docs/git-worktree
Prefix: git log file

Fla: --mailmap
--use-mailmap
Effect: Use mailmap file to map author and committer names and email addresses to canonical real names and email addresses.
Page: https://git-scm.com/docs/git-worktree
Prefix: git log file

Fla: --full-diff
Page: https://git-scm.com/docs/git-worktree
Prefix: git log file
Print: the full diff is shown for commits that touch the specified paths;
Extra: this means that "<path>…​" limits only commits, and doesn’t limit diff for those commits.

Fla: --log-size
Page: https://git-scm.com/docs/git-worktree
Prefix: git log file
Print: Include a line “log size <number>” in the output for each commit, where <number> is the length of that commit’s message in bytes.
Extra: Intended to speed up tools that read log messages from git log output by allowing them to allocate space in advance.

Fla: -L<start>,<end>:<file>
Effect: Show history of lines from <start> to <end> in <file>
Page: https://git-scm.com/docs/git-log
Prefix: git log file

Fla: -- path
Page: https://git-scm.com/docs/git-log
Prefix: git log
Print: Show only commits that are enough to explain how the files that match the specified paths came to be.

Fla: --max-count=<number>
Effect: Limit the number of commits to output.
Page: https://git-scm.com/docs/git-log
Prefix: git log
Flag abbreviation: -<number>
-n <number>

Fla: --skip=<number>
Effect: Skip number commits before starting to show the commit output.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --committer=<pattern>
Effect: Limit the commits output to ones with committer header lines that match the specified pattern
Page: https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History
Prefix: git log
Chapter: 2
Section: 3

Fla: --grep-reflog=<pattern_1> ... --grep-reflog=<pattern_n>
Page: https://git-scm.com/docs/git-log
Prefix: git log
Print: Limit the commits output to ones with reflog entries that match any of the specified pattern_i

Fla: --all-match
Effect: Limit the commits output to ones that match all given --grep, instead of ones that match at least one.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --invert-grep
Effect: Limit the commits output to ones with log message that do not match the pattern specified with --grep=<pattern>.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --regexp-ignore-case
Effect: Match the regular expression limiting patterns without regard to letter case.
Page: https://git-scm.com/docs/git-log
Prefix: git log
Flag abbreviation: -i

Fla: --basic-regexp
Effect: Consider the limiting patterns to be basic regular expressions; this is the default.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --extended-regexp
Effect: Consider the limiting patterns to be extended regular expressions instead of the default basic regular expressions.
Page: https://git-scm.com/docs/git-log
Prefix: git log
Flag abbreviation: -E

Fla: --fixed-strings
Effect: Consider the limiting patterns to be fixed strings (don’t interpret pattern as a regular expression).
Page: https://git-scm.com/docs/git-log
Prefix: git log
Flag abbreviation: -F

Fla: --perl-regexp
Effect: Consider the limiting patterns to be Perl-compatible regular expressions.
Page: https://git-scm.com/docs/git-log
Prefix: git log
Flag abbreviation: -P

Fla: --remove-empty
Effect: Stop when a given path disappears from the tree.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --merges
Page: https://git-scm.com/docs/git-log
Prefix: git log
Print: Print only merge commits.

Fla: --no-merges
Page: https://git-scm.com/docs/git-log
Prefix: git log
Print: Do not print commits with more than one parent.

Fla: --min-parents=<number>
Effect: print only commits with at least <number> parents
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --max-parents=<number>
Effect: print only commits with at most <number> parents
Page: https://git-scm.com/docs/git-log
Prefix: git log

Question: How to find octopus merges
Answer: --min-parents=3
Page: https://git-scm.com/docs/git-log

Question: How to find all root commits
Answer: --max-parents=0
Page: https://git-scm.com/docs/git-log
Context: git log

Fla: --first-parent
Effect: When finding commits to include, follow only the first parent commit upon seeing a merge commit.
Page: https://git-scm.com/docs/git-log
Prefix: git log
Extra: This option can give a better overview when viewing the evolution of a particular topic branch, because merges into a topic branch tend to be only about adjusting to updated upstream from time to time, and this option allows you to ignore the individual commits brought in to your history by such a merge.

Fla: --exclude-first-parent-only
Effect: When finding commits to exclude (with a ^), follow only the first parent commit upon seeing a merge commit.
Page: https://git-scm.com/docs/git-log
Prefix: git log
Extra: This can be used to find the set of changes in a topic branch from the point where it diverged from the remote branch, given that arbitrary merges can be valid topic branch changes.

Fla: --not
Effect: inverse the meaning of ^ and of the lack thereof
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --all
Effect: Pretend as if all the refs in refs/, along with HEAD, are listed on the command line as <commit>.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --branches
Effect: Pretend as if all the refs in refs/heads are listed on the command line as <commit>
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --branches=<pattern>
Effect: Pretend as if all the refs in refs/heads matching <pattern> are listed on the command line as <commit>
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --tags
Effect: Pretend as if all the refs in refs/tags are listed on the command line as <commit>.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --tags=<pattern>
Effect: Pretend as if all the refs matching <pattern> in refs/tags are listed on the command line as <commit>.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --remotes
Effect: Pretend as if all the refs in refs/remotes are listed on the command line as <commit>.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --remotes=<pattern>
Effect: Pretend as if all the refs matching <pattern> in refs/remotes are listed on the command line as <commit>.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --glob=<glob-pattern>
Effect: Pretend as if all the refs matching shell glob <glob-pattern> are listed on the command line as <commit>.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --exclude=<glob-pattern>
Effect: Do not include refs matching <glob-pattern> that the next --all, --branches, --tags, --remotes, or --glob would otherwise consider.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --reflog
Effect: Pretend as if all objects mentioned by reflogs are listed on the command line as <commit>.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --alternate-refs
Effect: Pretend as if all objects mentioned as ref tips of alternate repositories were listed on the command line.
Page: https://git-scm.com/docs/git-log
Prefix: git log
Extra: An alternate repository is any repository whose object directory is specified in objects/info/alternates. The set of included objects may be modified by core.alternateRefsCommand, etc.

Fla: --single-worktree
Effect: This option forces them to examine the current working tree only.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --ignore-missing
Effect: Upon seeing an invalid object name in the input, pretend as if the bad input was not given.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --bisect
Effect: Pretend as if the bad bisection ref refs/bisect/bad was listed and as if it was followed by --not and the good bisection refs refs/bisect/good-* on the command line.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --stdin
Effect: In addition to the <commit> listed on the command line, read them from the standard input. If a -- separator is seen, stop reading commits and start reading paths to limit the result.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --chery-pick
Effect: Omit any commit that introduces the same change as another commit on the “other side” when the set of commits are limited with symmetric difference.
Page: https://git-scm.com/docs/git-log
Prefix: git log
Assuming: the set of commits are limited with symmetric difference.

Fla: --cherry-mark
Effect: Like --cherry-pick (see below) but mark equivalent commits with = rather than omitting them, and inequivalent ones with +.
Page: https://git-scm.com/docs/git-log
Prefix: git log
Assuming: the set of commits are limited with symmetric difference.

Fla: --left-only
Effect: List only commits on the left side of a symmetric difference
Page: https://git-scm.com/docs/git-log
Prefix: git log
Assuming: the set of commits are limited with symmetric difference.

Fla: --right-only
Effect: List only commits on the right side of a symmetric difference
Page: https://git-scm.com/docs/git-log
Prefix: git log
Assuming: the set of commits are limited with symmetric difference.

Fla: --chery
Effect: --right-only --cherry-mark --no-merges
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --walk-reflogs
Effect: Instead of walking the commit ancestry chain, walk reflog entries from the most recent one to older ones.
Page: https://git-scm.com/docs/git-log
Prefix: git log
Flag abbreviation: -g

Fla: --merge
Effect: After a failed merge, show refs that touch files having a conflict and don’t exist on all heads to merge.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --boundary
Effect: Output excluded boundary commits. Boundary commits are prefixed with -.
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: history simplification
Effect: todo
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: --no-wark
Page: https://git-scm.com/docs/git-log
Prefix: git log
Print: Only show the given commits, but do not traverse their ancestors.

Fla: --no-wark=sorted
Page: https://git-scm.com/docs/git-log
Prefix: git log
Print: Only show the given commits, but do not traverse their ancestors, in input order

Fla: --do-wark
Effect: overrides a previous --do-walk
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: commit formatting
Effect: todo
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: pretty formats
Effect: todo
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: diff formatting
Effect: todo
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: Generating patch text with -p
Effect: todo
Page: https://git-scm.com/docs/git-log
Prefix: git log

Fla: Combined diff format
Effect: todo
Page: https://git-scm.com/docs/git-log
Prefix: git log

Variable: format.pretty
Meaning: Default for the --format option
Page: https://git-scm.com/docs/git-log
Context: git log
Initialization: medium

Variable: i18n.logOutputEncoding
Meaning: Encoding to use when displaying logs.
Page: https://git-scm.com/docs/git-log
Context: git log
Initialization: the value of i18n.commitEncoding if set, and UTF-8 otherwise.

Variable: log.date
Meaning: Default format for human-readable dates.
Page: https://git-scm.com/docs/git-log
Context: git log
Initialization: write dates like Sat May 8 19:35:34 2010 -0500.

Variable: log.follow
Meaning: if true, add --follow option for single <path>
Page: https://git-scm.com/docs/git-log
Context: git log

Variable: log.showRoot
Meaning: if false, git log and related commands will not treat the initial commit as a big creation event
Page: https://git-scm.com/docs/git-log
Context: git log

Variable: log.showSignature
Meaning: If true, git log and related commands will act as if the --show-signature option was passed to them.
Page: https://git-scm.com/docs/git-log
Context: git log

Variable: mailmap.*
Meaning: See git-shortlog[1].
Page: https://git-scm.com/docs/git-log
Context: git log

Variable: notes.displayRef
Meaning: Which refs, in addition to the default set by core.notesRef or GIT_NOTES_REF, to read notes from when showing commit messages with the log family of commands.
Page: https://git-scm.com/docs/git-log
Context: git log