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?
DESCRIPTION. Use git mergetool to run one of several merge utilities to resolve merge conflicts. It is typically run after git merge. If one or more <file> parameters are given, the merge tool program will be run to resolve differences on each file (skipping those without conflicts).
git difftool is a Git command that allows you to compare and edit files between revisions using common diff tools. git difftool is a frontend to git diff and accepts the same options and arguments.
The default Diff Tool is vimdiff. Specifying a Diff Tool affects the git difftool command. The command git diff still performs diffing on the command-line.
They are two different operations, and you could technically have two different programs configured (in the Git world, at least) to perform each operation.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With