User Tools

Site Tools


git_log

Overview

Discussion of git log, with emphasis on reachability.

Reachability

git log displays repository history based on reachability:

        o---o---o---o---o  master
             \       \
              o---o---o---o---o  next
                           \
                            o---o---o  topic

Identify the specific starting point(s):

$ git log master
$ git log topic master

Identify revisions not of interest:

$ git log next --not master
$ git log next ^master
$ git log next topic ^master
$ git log b1 b2 b3 ... ^b8 ^b9 v1.0 v2.0 ...

Given this history:

        o---o---o---o---o  master
             \       \
              o---o---o---o---o  next
                           \
                            o---o---o  topic

there is a special notation for the most common exclusion (remember this one for rebasing):

$ git log next ^master
$ git log master..next
$ git log next..topic

Why is "git log" so slow?

If you want to see the log of all changes to a single file:

$ git log --oneline -- scripts/dtc/Makefile

it will take a while as Git does not store per-file changes with the file.

diff-filter

Show only commits that deleted files:

$ git log --diff-filter=D --summary
git_log.txt · Last modified: 2019/03/13 14:52 by rpjday