Git - difftool

About

This article is about the difftool configuration.

Is there a diff with the mergetool?

Example

  • meld on linux
  • WinMerge or p4merge on windows

Management

Tool

git difftool --tool=<tool> may be set to one of the following:

  • vimdiff
  • vimdiff2
  • vimdiff3

The following tools are valid, but not currently available:

  • araxis
  • bc
  • bc3
  • codecompare
  • deltawalker
  • diffmerge
  • diffuse
  • ecmerge
  • emerge
  • gvimdiff
  • gvimdiff2
  • gvimdiff3
  • kdiff3
  • kompare
  • meld
  • opendiff
  • p4merge
  • tkdiff
  • winmerge

Some of the tools listed above only work in a windowed environment. If run in a terminal-only session, they will fail.

Set

Git - Config

git config --global diff.tool toolName

Example p4merge

git config --global diff.tool p4merge
git config --global difftool.p4merge.cmd 'p4merge.exe $LOCAL $REMOTE'
git config --global difftool.prompt false

Documentation / Reference

git difftool --tool-help





Discover More
Git Commit Tree Data Model
Git - Commit

A commit in git is an object that stores the information : who saved the file system snapshots, when they were saved, why they were saved. the commiter the author the parent commit It's...



Share this page:
Follow us:
Task Runner