Using external Diff in Sourcetree

Using external Diff in Sourcetree

Source Tree Diff External

Git is one of the best and most preferred version control system available. Many projects implement Git repositories for storing and managing codes, regardless of whether it for a big enterprise or a small-scale project. With Git, it becomes easy to code and offer exciting integration features, which would help you to work with ease on any project or along with any teams.

Now, it is important that a developer should possess Git skill. It might not be easy for beginners to understand any commands or operations; however, there are a number of tools that are available, which can help make it easier to provide GUI alternatives to Git CLI. Such as: Github Desktop, Git Kraken, SmartGit, GitCola, Egit, Gitg, Source Tree etc.

Source Tree is a free Git client for Windows and Mac. Sourcetree simplifies how you interact with your Git repositories so you can focus on coding. Visualize and manage your repositories through Sourcetree’s simple Git GUI.

One of Source Tree special function is External Diff. With this function where user can call-out to an external diff tool like Beyond Compare or Winmerge to know where is data have changed.

Setting on Windows

To use this functions, access to Source Tree -> Tools -> Options. Choose Diff Tab in the Options popup. In External Diff Tool, you will see the list of External Tool that Source Tree is supporting, such as: WinMerge, DiffMerge or BeyondCompare. In this tutorial, I’m using BeyondCompare. Before setting, you should install this tool on the URL below:

If you haven’t installed External Tool, the Diff Command text box will be empty. Arguments text box should let it be, don’t edit anymore.

In the main screen, if you have the file what have many edited place, normally you could see it on the Source Tree’s Diff Panel, but it’s so small and hard to see them. In this case, you could use External Diff

Replace for Source Tree’s Diff Panel, you have 3 ways to call-out to an External Diff tool ( Beyond Compare ).

Method 1: Click the file on the left of Diff Panel that you want to see. Press hot key: Ctrl + D to open External Tool

Method 2: Click the file on the left of Diff Panel that you want to see.  On the Menu bar, choose Actions -> External Diff to open External Tool

Method 3: Click the file on the left of Diff Panel that you want to see. On the Panel bar, click Setting icon, and choose External Diff

After doing 1 of 3 ways above, the external tool will be opened. Default, Code will be show by [All], but you can change it to [Diffs] to show only diff place or [Same] to show only same place.

Setting on Mac

On SourceTree, choose “Source Tree” -> “Preference” for using this function

After that, choose “Diff” tab from the popup screen which is being showed. The screen for choosing External Diff Tool will be showed.

Because on Windows and Mac, Diff tools are supported by Source Tree are various, so depend on OS, you can choose Diff tool you want to use.