Edit online

How to Integrate the File Comparison Tool with Sourcetree

The file comparison tool can be integrated with Sourcetree so that you can use it to compare changes. The advantages of doing this include:
  • The Oxygen Compare Files tool presents the files side-by-side and makes it much easier to determine real changes.
  • The Oxygen Compare Files tool includes XML comparison algorithms.
  • The Oxygen Compare Files tool includes various options for configuring the comparison.
  • The Oxygen Compare Files tool allows you to navigate through changes.

To integrate the Compare Files tool with Sourcetree, follow this procedure, depending on your operating system:

Windows
  1. In Sourcetree, go to Tools > Options.
  2. Go to the Diff tab.
  3. In the External Diff/Merge section, configure the settings as follows:
    • External Diff Tool - Select Custom.
    • Diff Command - Enter the path of the Oxygen diffFiles.exe file (for example: c:\Programs\Oxygen XML Editor\diffFiles.exe).
    • Arguments - Enter -ext $REMOTE $LOCAL $LOCAL.
    • Merge Tool - Select Custom.
    • Diff Command - Enter the path of the Oxygen diffFiles.exe file (for example: c:\Programs\Oxygen XML Editor\diffFiles.exe).
    • Arguments - Enter -ext $LOCAL $REMOTE $BASE $MERGED.
  4. Click OK.

Result: In Sourcetree, you can now compare file changes with the Oxygen Compare Files tool by simply selecting External Diff from the contextual menu, Actions menu, or Ctrl+D.

macOS
  1. In Sourcetree, go to Sourcetree > Preferences.
  2. Go to the Diff tab.
  3. In the External Diff/Merge section, configure the settings as follows:
    • External Diff Tool - Select Custom.
    • Diff Command - Enter a command-line argument to launch the Oxygen diffFiles.sh file (for example: sh "/Applications/Oxygen XML Editor/diffFiles.sh").
    • Arguments - Enter -ext $REMOTE $LOCAL $LOCAL.
    • Merge Tool - Select Custom.
    • Diff Command - Enter a command-line argument to launch the Oxygen diffFiles.sh file (for example: sh "/Applications/Oxygen XML Editor/diffFiles.sh").
    • Arguments - Enter -ext $LOCAL $REMOTE $BASE $MERGED.
  4. Close the preferences dialog box.

Result: In Sourcetree, you can now compare file changes with the Oxygen Compare Files tool by simply selecting External Diff from the contextual menu or Actions menu.