Git mergetool与difftool [英] Git mergetool vs difftool

查看:140
本文介绍了Git mergetool与difftool的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读 mergetool difftool ,但我想我对于两者之间的一般差异还不清楚。他们都调用某种合并工具,对吧?运行差异的关键是合并,对吗?



这些指令的外行人的描述是什么?



更新:我想我需要扩展这个问题。是的......一个人说差异。另一个说合并。但是运行diff的目的/用途是什么?您能否在看到差异后决定要继续并合并?差异工具通常与您合并运行的工具相同吗?如果你运行mergetool,然后取消合并,你不是基本上做difftool做的吗?

他们是两个不同的操作,你可以在技术上配置两个不同的程序(至少在Git世界中)来执行每个操作。


  • DIFF - 你希望看到两个文件(或更多,和/或文件夹结构)之间的差异。

  • MERGE - 您想查看两个(或更多)文件之间的差异并尝试将它们合并在一起转换为单个输出文件



MERGE可能会将DIFF显示为其工作的一部分,但它们是分开的。很多差异程序多年来一直模糊线条,并开始处理合并。


I've read the man pages for mergetool and difftool but I guess I'm still not clear on the general differences between the two. They both call up a merge tool of some sort, right? The point of running a diff is to merge, right?

What's the layman's descriptions for each of these directives?

update: I guess I need to expand on this question. Yes... one says diff. The other one says merge. But what is the purpose/use of running a diff? Can you decide, upon seeing the diff, that you want to go ahead and merge? Are diff tools generally the same tools you run for merges? If you run mergetool and then canceled the merge, didn't you just essentially do what difftool did?

解决方案

They are two different operations, and you could technically have two different programs configured (in the Git world, at least) to perform each operation.

  • DIFF - you want to see the differences between two files (or more, and/or folder structures)
  • MERGE - you want to see the differences between two (or more) files and try to merge them together into a single output file

The MERGE might show DIFFs as part of it's working, but they are separate things. A lot of diff programs have blurred the lines over the years and started to handle merging as well.

这篇关于Git mergetool与difftool的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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