git log

Revision ranges

git log master             # branch
git log origin/master      # branch, remote
git log v1.0.0             # tag

git log master develop

git log v2.0..master       # reachable from *master* but not *v2.0*
git log v2.0...master      # reachable from *master* and *v2.0*, but not both

See gitrevisions.

Basic filters

-n, --max-count=2
    --skip=2
    --since="1 week ago"
    --until="yesterday"
    --author="Rico"
    --committer="Rico"
    --grep="Merge pull request"   # in commit messages
    -S"console.log"               # in code
    -G"foo.*"                     # in code (regex)

Limiting

Simplification

Ordering

Formatting

Custom formats

See: Git log format cheatsheet

Also see

  • Git log format cheatsheet

Last updated

Was this helpful?