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 Oxygen
Compare Files tool provides the following advantages when using it with
Sourcetree:
- The files are presented side-by-side to make it much easier to determine real changes.
- XML comparison algorithms are available.
- Various options can be used to configure the comparison.
- You can navigate through changes, one by one.
To integrate the Compare Files tool with Sourcetree, use the following procedure, depending on your operating system:
- Windows
-
- In Sourcetree, go to .
- Go to the Diff tab.
- 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.
- 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
-
- In Sourcetree, go to .
- Go to the Diff tab.
- 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.
- 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.