Git mergetool vs difftool

I read the manual pages for mergetool and difftool , but I guess I still don't understand the general differences between them. They both call the merge tool, right? The diff trigger point is to merge, right?

What do laypersons describe for each of these directives?

update: I think I need to expand this question. Yes ... they say different. Another is talking about merging. But what is the purpose / use of running diff? Can you decide, having seen diff, that you want to go ahead and merge? Are diff tools the same tools you run for merges? If you ran mergetool and then canceled the merge, didn’t you just do what diffftool did?

+7
source share
2 answers

These are two different operations, and you can technically set up two different programs (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 combine them into one output file

MERGE may show DIFF as part of his work, but they are separate things. Many diff programs blurred lines over the years and also began to handle merging.

+7
source

A difftool is called to show the differences between two or more files.

A mergetool is called to help you merge the differences between two or more files.

+6
source

All Articles