How to make git diff show the same result as github's pull request diff?

橙三吉。 提交于 2019-11-30 01:11:33

问题


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


回答1:


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?



来源:https://stackoverflow.com/questions/37763836/how-to-make-git-diff-show-the-same-result-as-githubs-pull-request-diff

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!