![to to](https://c1.lmlphp.com/image/static/default_avatar.gif)
本文介绍了git分支之间的视觉差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这个答案非常适合看到两个检查到git的文件之间的视觉差异:
但是,我希望看到两个分支之间的视觉差异。到目前为止,我最好的选择似乎是:
git diff --name-status master dev
这不是非常有用的信息,也不是非常直观。
还有什么比这更好的? 解决方案
使用与。
git diff branch1..branch2
这将比较每个分支的提示。
如果您确实需要一些GUI软件,您可以尝试,它支持Mac OS X和Windows。
This answer is great for seeing a visual diff between two files that are checked into git:How do I view 'git diff' output with a visual diff program?
However, I'd like to see a visual diff between two branches. So far, my best bet seems to be:
git diff --name-status master dev
which isn't very informative and not very visual.
Is there anything better out there?
解决方案
Use git diff
with a range.
git diff branch1..branch2
This will compare the tips of each branch.
If you really want some GUI software, you can try something like SourceTree which supports Mac OS X and Windows.
这篇关于git分支之间的视觉差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!