git 如何区分 GitHub 中的两个分支?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43552274/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I diff two branches in GitHub?
提问by Lost
I am just wondering if there is a way to simply diff two branches in GitHub? I know GitHub has capacity to do it because when we do code-reviews it does list out all the diffs nicely. I was just wondering if there is a way to do it without any code review to compare say Branch to Branch or Commit to Commit? So that when I push something to my remote branch and I want to see how my diffs are going to look like BEFORE it create a PR then it can be very helpful.
我只是想知道是否有一种方法可以简单地比较 GitHub 中的两个分支?我知道 GitHub 有能力做到这一点,因为当我们进行代码时,它确实会很好地列出所有差异。我只是想知道是否有一种方法可以在没有任何代码的情况下将分支与分支或承诺提交进行比较?因此,当我将某些内容推送到我的远程分支时,我想看看我的差异在创建 PR 之前会是什么样子,那么它会非常有帮助。
I can always be in console and do git diff but that is really not as nice and visually clear as how it shows up in web UI of GitHub. Any ideas?
我总是可以在控制台中执行 git diff ,但这确实不像它在 GitHub 的 Web UI 中显示的那样美观和直观。有任何想法吗?