我如何区分GitHub中的两个分支? [英] How can I diff two branches in GitHub?

查看:407
本文介绍了我如何区分GitHub中的两个分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道是否有办法简单地在GitHub中区分两个分支?我知道GitHub有能力做到这一点,因为当我们做代码审查时,它确实很好地列出了所有的差异。我只是想知道是否有办法做到这一点,没有任何代码审查比较分支分行或承诺提交?所以当我把东西推到我的远程分支时,我想看看我的差异是如何看起来像它之前创建一个PR,那么它可以是非常有用的。

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.

我总是可以在控制台中执行git diff,但实际上并不像GitHub的Web UI中显示的那样好看和清晰。任何想法?

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?

推荐答案

使用比较功能来完成此操作。

Use the compare feature to accomplish this.

这篇关于我如何区分GitHub中的两个分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆