我的仓库历史看起来像这样:
x---y-+-z-+-branch
/ / /
---a---b---c-+-d-+-e---master
我想获得“分支”完整历史的单个差异(即,像“git diff”输出——我不想要一大堆差异,如“git log -p”产生),不包括从“master” merge 到“branch”的任何更改。
我该怎么做?
最佳答案
您正在寻找的命令是:
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:显示分支之间的差异,忽略 merge 的提交,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15372825/