问题描述
分支合并后,github不再显示差异,但我尝试提出pull请求,但git diff仍会显示差异。
例如,我有分支D,在分支H上创建了修补程序,将H合并到了D,然后在D上创建了更多的东西。现在,git hub将reuqest从H移动到D显示没有区别,但git diff显示区别。我试图做的是创建一个命令行工具来查看哪些旧分支(可能有很多)没有代码差异来开发。现在我必须去github,做一个pull reuqest并选择每个分支来查看是否有区别。
谢谢
语法:
git diff D ... H
另见
After branches are merged, and github no longer show difference when i try to make a pull request, but git diff will still show differences.
For example I have branch D, created hotfix on branch H, merged H to D, then created more stuff on D. Now git hub pull reuqest from H to D shows no difference but git diff H D show differences.
What I am trying to do is to create a commandline tool to see which old branches (there can be a lot) don't have code differences to develop. right now I have to go to github, do a pull reuqest and select each branch to see if there are difference.
Thanks
You probably want the "triple-dot" syntax:
git diff D...H
See also What are the differences between double-dot ".." and triple-dot "..." in Git diff commit ranges?
这篇关于如何使git diff显示与github的pull request diff相同的结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!