如何在远程分支合并之前检查真正的git diff? [英] How to check real git diff before merging from remote branch?

查看:301
本文介绍了如何在远程分支合并之前检查真正的git diff?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检查远程分支和本地分支之间的真正差异。我怎么能做到这一点?

I want to check the real diff between remote branch and local branch. How can I do that?

发出下面的命令部分起作用,但它也显示了我本地分支的新变化的差异。

Issuing the below command partially works, but it shows the diff of the new changes of my local branch too.

git diff remote/branch


推荐答案

文档

From the documentation:


git diff [--options] <commit>...<commit> [--] [<path>…]

这种形式是查看
包含并高达
秒的<< commit> 的分支,从< $ c $< ;提交> 。 git diff
A ... B相当于git diff
$(git-merge-base A B)B。您可以省略
任何一个< commit> ,其中
具有与使用HEAD相同的效果。

This form is to view the changes on the branch containing and up to the second <commit>, starting at a common ancestor of both <commit>. "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B". You can omit any one of <commit>, which has the same effect as using HEAD instead.

你试过这个吗?

这篇关于如何在远程分支合并之前检查真正的git diff?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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