Ever wanted to see all the changes that someone has made on a branch and only those changes? Doing a “git diff” won’t help because that will also show the changes that have been made on the branch you’re diffing against. You could use “git merge-base” but that only goes to the last merge. What we need to do is find the oldest common ancestor between the branches and then diff the branch in question against that ancestor. Luckily, you can do this with a git alias.
Add the following to your ~/.gitconfig: