git difftool's Examples

Launches the default configured diff tool to compare changes between working directory and indexLaunches the default configured diff tool to compare changes between working directory and index

git difftool

Compares working directory with the last commit (HEAD)

git difftool HEAD

Compares changes between two commits

git difftool abc123 def456

Compare staged changes with last commit

git difftool --cached

Alias for --cached, used to compare staged changes

git difftool --staged

Specifies which external tool to use (overrides config)

git difftool --tool=meld

Suppresses prompt before launching the tool

git difftool --no-prompt

Launches diff tool in directory comparison mode

git difftool --dir-diff

Show only names of changed files, not the diffs

git difftool --name-only

Automatically launch difftool without asking

git difftool -y

Compare specific file in the commit with working directory

git difftool HEAD~1 -- index.html

Compare changes between two previous commits

git difftool HEAD~2 HEAD~1

Use external tool to compare.

git difftool

DevOpsSchool
Typically replies within an hour

DevOpsSchool
Hi there 👋

How can I help you?
×
Chat with Us