GIT 差异图形用户界面
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1112490/
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
GIT diff GUI
提问by daniel
I have a rather large diff of 2 GIT branches and would like to open them in some sort of nice UI side by side. Something that shows me the diff's easily, and hopefully that I can merge differences one by one. git diff is rather hard to work with.
我有 2 个 GIT 分支的相当大的差异,并希望在某种漂亮的 UI 中并排打开它们。一些很容易向我展示差异的东西,希望我可以一一合并差异。git diff 很难使用。
采纳答案by Jakub Nar?bski
The answer is git difftool(at least for git version 1.6.3 and later). Please remember that it just invokes configured or automatically found graphical diff tool.
答案是git difftool(至少对于 git 1.6.3 及更高版本)。请记住,它只是调用已配置或自动找到的图形差异工具。
回答by Adrian Panasiuk
回答by Ted Percival
If you are in the process of merging, git diff
has a really nice syntax where the first two columns show the parentage of each line, in a kind of unified merge diff. From there it's easy to resolve the conflicts with any editor.
如果您正在合并,git diff
有一个非常好的语法,其中前两列以一种统一的合并差异显示每行的出处。从那里很容易解决与任何编辑器的冲突。
Do you have the pretty colors turned on? Here's a snippet from my ~/.gitconfig:
你有没有打开漂亮的颜色?这是我的 ~/.gitconfig 中的一个片段:
[color] diff = auto branch = auto status = auto interactive = auto
Anyway, take a look at kdiff3, for instance. You can specify the tool to be used for merging, see the git-mergetooldocs for details.
无论如何,以 kdiff3 为例。您可以指定用于合并的工具,有关详细信息,请参阅git-mergetool文档。