Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git: show diff between branches, ignoring commits merged in

Tags:

git

My repository history looks something like this:

         x---y-+-z-+-branch
        /     /   /
---a---b---c-+-d-+-e---master

I want to get a single diff (i.e., like 'git diff' outputs- I don't want a whole bunch of diffs like 'git log -p' produces) of the complete history of 'branch', without including any of the changes that were merged into 'branch' from 'master'.

How can I do this?

like image 768
spiffytech Avatar asked Mar 12 '13 21:03

spiffytech


1 Answers

The command you are looking for is:

git diff master...branch

From git help diff:

git diff [--options] <commit>...<commit>

This form is to view the changes on the branch containing and up to the second

like image 94
Chronial Avatar answered Oct 20 '22 15:10

Chronial