HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

git difftool — Show file changes using external diff tools. Accepts the same options and arguments as `git diff`. S

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandgit difftoolshowclifileusingchangesexternal

Problem

How to use the git difftool command: Show file changes using external diff tools. Accepts the same options and arguments as git diff. See also: git diff. More information: <https://git-scm.com/docs/git-difftool>.

Solution

git difftool — Show file changes using external diff tools. Accepts the same options and arguments as git diff. See also: git diff. More information: <https://git-scm.com/docs/git-difftool>.

List available diff tools:
git difftool --tool-help


Set the default diff tool to Meld:
git config --global diff.tool "meld"


Use the default diff tool to show staged changes:
git difftool --staged


Use a specific tool to show changes since a given commit:
git difftool {{[-t|--tool]}} {{opendiff}} {{commit}}

Code Snippets

List available diff tools

git difftool --tool-help

Set the default diff tool to Meld

git config --global diff.tool "meld"

Use the default diff tool to show staged changes

git difftool --staged

Use a specific tool to show changes since a given commit

git difftool {{[-t|--tool]}} {{opendiff}} {{commit}}

Context

tldr-pages: common/git difftool

Revisions (0)

No revisions yet.