我的代码库历史记录大致如下:
x---y-+-z-+-branch
/ / /
---a---b---c-+-d-+-e---master
我希望获得一个单一的差异(即像“git diff”输出的那样-我不想要“git log -p”产生的一堆差异),“branch”的完整历史记录,而不包括从“master”合并到“branch”的任何更改。如何做到这一点?
我的代码库历史记录大致如下:
x---y-+-z-+-branch
/ / /
---a---b---c-+-d-+-e---master
你要查找的命令是:
git diff master...branch
从git help diff
中得知:
git diff [--options] <commit>...<commit>
This form is to view the changes on the branch containing and up to the second
git log branch_name --not master --no-merges --pretty="format:%H"
。 - ben