git log the difference between 1 branch from another

Adam Johnson picture Adam Johnson · Jul 26, 2012 · Viewed 25.9k times · Source

I have 2 branches A and B.

Whenever I run a build, Branch A gets merged into Branch B. I want to be able to email out all the updates made in A, since the last time the build was ran. How can I use git log to be able to copy all the commits made in A since the last A -> B merge?

Answer

che picture che · Jul 26, 2012

That'll be

git log B..A

E.g. "display all commits that are in A but not in B" Or if you wish to do it against non local branches

git log origin/B..origin/A