Sometimes I have the following problem:
Add some commits in a feature branch.
Update master from upstream.
Want to see the diff between the feature branch and master, but git diff master
shows all of the things that have been added/removed in master, when I really only want to see the commits that the feature branch is ahead of master, not the ones that it's behind.
Is there a way to do this without having to merge master into the feature branch?
I think the right answer is triple dot
git diff master...feature
That shows only new changes on feature with respect to master. See also: git diff - show only what's new on the remote