比较Git中的两个分支? [英] Comparing two branches in Git?

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

问题描述

我有两个分支, branch_1 branch_2

我想看看Git中两个分支之间的差异。

I want to see the differences between the two branches in Git.

推荐答案

git diff branch_1..branch_2

两个分支尖端之间的差异。如果你想从他们的共同祖先中找到差异来测试,你可以使用三个点而不是两个:

That will produce the diff between the tips of the two branches. If you'd prefer to find the diff from their common ancestor to test, you can use three dots instead of two:

git diff branch_1...branch_2

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

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