Installation
Table of Contents
Installation
Homebrew (macOS/Linux)
brew tap masukomi/homebrew-tap
brew install masukomi/homebrew-tap/cleandiff
From Source
Prerequisites
Install the Wails CLI with:
go install github.com/wailsapp/wails/v2/cmd/wails@latest
Building
git clone https://github.com/masukomi/cleandiff.git
cd cleandiff
cd frontend && npm install && cd ..
wails build
The built application will be in build/bin/:
- macOS:
build/bin/cdiff.app(with CLI atcdiff.app/Contents/MacOS/cdiff) - Linux:
build/bin/cdiff
Add the cdiff executable to your PATH to use it from the command line.
Configuration
Git
First, let’s add cdiff as a new difftool
git config --global difftool.cdiff.cmd 'cdiff "$LOCAL" "$REMOTE" "$MERGED"'
Next, let’s add an alias so that we can just say git cdiff <diff options> instead of having to type git difftool --tool=cdiff <diff options>
git config --global alias.cdiff "difftool --tool=cdiff"
Optional If you want to make it your default difftool you can run the following command. While I use it regularly, sometimes traditional diffing tools are the right choice.
git config --global diff.tool cdiff