Skip to content

Command: git branchless difftool

kain88-de edited this page May 4, 2024 · 6 revisions

Description

Available since v0.8.0.

The git branchless difftool subcommand exposes an interactive interface to view diffs. You can integrate it into Git by setting it as a difftool or mergetool. Here's what it looks like:

Screenshot 2023-08-31 at 16 05 26

Usage

Example configuration for your .gitconfig:

[difftool "branchless"]
  cmd = git-branchless difftool --read-only --dir-diff $LOCAL $REMOTE

[mergetool "branchless"]
  cmd = git-branchless difftool $LOCAL $REMOTE --base $BASE --output $MERGED

Then you can invoke it instead of git diff via a command like this (you may want to create a more usable alias for yourself):

$ git difftool --tool 'branchless' --dir-diff HEAD~
Clone this wiki locally