I find that I often do this.
- Run
git pull
orgit pull --rebase
Look at the standard output to see the changes
From github.com:foo/bar 3d8749e..b795f99 master -> origin/master
Copy ’n’ paste this version range to
git log -p 3d8749e..b795f99
I wonder if there is is a way to specify “The state of HEAD
before the last pull or merge“, so that I can simply always run the same command
git log -p HEAD@{before pull}..HEAD
Simply always using HEAD@{1}
is close and might work for git pull
, but not for git pull --rebase
, because that adds multiple entries to the reflog:
$ git reflog
4111cc6 (HEAD -> master) HEAD@{0}: rebase finished: returning to refs/heads/master
4111cc6 (HEAD -> master) HEAD@{1}: pull --rebase: A local commit
b795f99 (origin/master, origin/HEAD) HEAD@{2}: pull --rebase: checkout b795f9924503c05da91b08e0e9ad3ffb48229bc8
d3379e5 HEAD@{3}: commit: A local commit