简体   繁体   中英

Git: show diff between branches, ignoring commits merged in

My repository history looks something like this:

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

I want to get a single diff (ie, 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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM