Version Control Clients and IDEs

Walkthroughs for the hosts listed on Using Diffoniq from Other Programs. In all of them the left side is a temporary copy of a stored revision and the right side is your real working file, which is why they share the same pair of switches — --read-only-left --no-backup.

Git (command line)

Add this to your .gitconfig (adjust the installation path):

[diff]
    tool = diffoniq
[difftool]
    prompt = false
[difftool "diffoniq"]
    cmd = \"C:/Program Files/Diffoniq/Diffoniq.exe\" --read-only-left --no-backup \"$LOCAL\" \"$REMOTE\"
[difftool "diffoniq-ro"]
    cmd = \"C:/Program Files/Diffoniq/Diffoniq.exe\" --read-only \"$LOCAL\" \"$REMOTE\"

Then:

CommandWhat you get
git difftool Your changes, file by file. The left side is the extracted revision, the right side is your working file — which stays editable and saveable.
git difftool --dir-diff The whole change set as one directory comparison.
git difftool -t diffoniq-ro HEAD~1 HEAD Two revisions against each other. Here both sides are temporary, so the second entry above locks both. Nothing can be saved, so the backup switch is pointless there.

TortoiseGit and TortoiseSVN

TortoiseGit: Settings → Diff Viewer → External.
TortoiseSVN: Settings → External Programs → Diff Viewer → External.

In both, enter:

"C:\Program Files\Diffoniq\Diffoniq.exe" --read-only-left --no-backup %base %mine

When you compare a modified file against the repository, %base is a temporary copy of the stored revision while %mine is your real working file — hence --read-only-left: the stored revision is protected, your own file stays editable.

If you compare two stored revisions with each other, both sides are temporary. Nothing is written back to the repository in that case, but edits are also pointless — use --read-only in the configuration line if you mostly work that way.

Visual Studio

For Team Foundation Version Control: Tools → Options → Source Control → Visual Studio Team Foundation Server → Configure User Tools → Add, then

FieldValue
Extension.*
OperationCompare
CommandC:\Program Files\Diffoniq\Diffoniq.exe
Arguments--read-only %1 %2

For Git repositories, Visual Studio uses its own built-in viewer; the .gitconfig entry above applies whenever you use Git on the command line from the same repository.

JetBrains IDEs (IntelliJ IDEA, PyCharm, Rider, CLion, …)

Open Settings → Tools → Diff & Merge → External Diff Tools and tick Enable external tools. Under Configure external tools: press + and fill in the Add An External Tool dialog:

Tool groupDiff tool
Tool nameDiffoniq
Program pathC:\Program Files\Diffoniq\Diffoniq.exe
Argument pattern--read-only-left --no-backup %1 %2

The step that is easy to miss: in the table below (Configure external diff/merge tools associated with a file type:), change the Default row from Built-in to Diffoniq in the Diff Tool column. Without it the IDE keeps using its own viewer and offers Diffoniq only through the Show Diff Using: Diffoniq menu entry — it looks as if nothing happened. The Test Diff button verifies the setup right away.

Leave Trust process exit code switched off — Diffoniq's graphical mode always exits with 0. Do not fill in the merge half of the dialog: Diffoniq is a diff viewer, not a merge tool.

What the placeholders really contain

The dialog explains %1 as left (Local changes) and %2 as right (Server content). For Show Diff on a modified file it is the other way round: left is the temporary copy of the repository version, right is your real working file — the same order the Tortoise clients use, which is why --read-only-left is the right switch here.

Unlike the Tortoise clients, the IDE's temporary copy is a writable file. Without the switch, edits made on the left are saved without complaint and are lost the moment the IDE discards the copy. The switch is what makes that side safe, and the practical gesture stays available: drag marked lines from the protected revision on the left into your working file on the right, then save. The IDE picks the change up on its own and refreshes the editor.

Two details worth knowing:

Further hosts

The pattern is always the same: point the host at Diffoniq.exe and let it pass the two paths as arguments. Only the placeholder names differ:

HostWhereArguments
SourceTreeTools → Options → Diff → External Diff Tool: Custom--read-only $LOCAL $REMOTE
SmartGitPreferences → Tools → Add (file comparison) --read-only ${leftFile} ${rightFile}
Git ExtensionsSettings → Git Config → Diff tool as in the .gitconfig above
TortoiseHgmercurial.ini, section [merge-tools]--read-only $parent $child
Perforce P4VPreferences → Diff → Other application --read-only %1 %2

If a host offers a test or preview button, use it once after setting things up — that is faster than guessing which placeholder it fills in.