Integrating DiffDog with Git

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Version Control System Integration >

Integrating DiffDog with Git

If you are using Git (https://www.git-scm.com/) as version control system, you can set DiffDog as Git differencing tool. You can also integrate DiffDog with any Git-based tool that provides the option to define a custom external differencing tool (for example, gitk). The configuration instructions below were tested for Git 1.9.4; they are likely to be similar for other Git versions. For further information about integrating Git with external differencing tools, refer to the Git user's manual.

 

 

To set DiffDog as the Git differencing tool:

Add or edit the following lines in the .gitconfig file (this file is located in the user home directory, typically: C:\Users\<username>\.gitconfig):

[diff]

 tool = diffdog

[difftool "diffdog"]

 cmd = "'C:/Program Files/Altova/DiffDog2019/DiffDog.exe'" "$LOCAL" "$REMOTE"

 

Note:If you are using DiffDog 32-bit on a 64-bit operating system, adjust the path to the DiffDog executable so that it points to C:/Program Files (x86) instead of C:/Program Files.

 

 

To check whether DiffDog is set as differencing tool:

Open the Git shell and enter the command git difftool --tool-help, as shown below.

cmd_git_bash_01

 

 

To view changes to a Git repository file in DiffDog:

1.Open the Git repository in the Git shell, and enter the command git difftool <changed file>, for example:

git difftool MyFile.txt

2.When prompted to confirm whether DiffDog should be launched, type Y, and then press Enter. To run DiffDog without being prompted first, use the command git difftool -y <changed file>.

 

Note that the difftool command does not yield results if you provide an unchanged file as argument.

 

 

To configure DiffDog as differencing tool in the Git graphical user interface:

1.Run gitk (for example, by right-clicking on a directory which is under Git control, and selecting Git History).
2.On the Edit menu, click Preferences.
3.Under External diff tool, click Choose and select the path to the DiffDog executable (for example, C:/Program Files/Altova/DiffDog2019/DiffDog.exe).

dlg_gitk

In the Git graphical user interface, you can now use the External diff command to view in DiffDog the changes between two Git commits.

dlg_gitk1


© 2019 Altova GmbH