Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Diff tool in SourceTree

I am using SourceTree as a Git client in my windows 7. I faced with a conflict and in order to resolve I click on Launch external merge tool as suggested. A window pops up very shortly and nothing happens then after!

I just tried it on my Mac OS and it shows external merge tool as expected.

under Tools -> Options -> Diff -> External Diff / Merge dropdown box, System Default is selected.

I expect to see the diff merge tool but it never shows up in my windows, anyone know what could be the reason?

like image 466
Ali Avatar asked Jun 03 '15 18:06

Ali


People also ask

What is diff tool in git?

DESCRIPTION. git difftool is a Git command that allows you to compare and edit files between revisions using common diff tools. git difftool is a frontend to git diff and accepts the same options and arguments. See git-diff[1].

What is the default git diff tool?

The default Diff Tool is vimdiff. Specifying a Diff Tool affects the git difftool command. The command git diff still performs diffing on the command-line.

How do I set the diff tool in SourceTree?

SourceTree config First, open up the options window and go to Diff tab. Change both External Diff Tool and Merge Tool to Custom. In the Diff Command field enter the full path to the vsdiffmerge.exe. For VS 2015 and below you can find it in the Visual Studio installation folder, under Common7\IDE subfolder.

How do I diff in SourceTree?

On macOS hold the ⌘ key, click over first branch, later secondary click over the second branch and select Diff Against Current option on Popup Menu. At the right Hand, you can see the difference.

How do I create a diff file in Sourcetree?

SourceTree config. First, open up the options window and go to Diff tab. Change both External Diff Tool and Merge Tool to Custom. In the Diff Command field enter the full path to the vsdiffmerge.exe. For VS 2015 and below you can find it in the Visual Studio installation folder, under Common7IDE subfolder.

How do I compare two files in Sourcetree?

You can also use an External Diff tool. For example I am using Beyond Compare. After you set it as an external diff tool in sourcetree, you select both files you want to compare using CTRL and after that you press CTRL+D. As a result, Beyond Compare will be launched with both files ready to be compared.

Is it possible to use DiffTool without Sourcetree?

Doing so is of course perfectly possible even without SourceTree. Just add the difftooland mergetool entries to your .gitconfig file (it should be located in your home folder) and execute the two git config commands shown above.

How do I set the diff tool for a process?

Could you open the process viewer (Tools > Process Viewer...), set the diff tool, then close the options window. Then look at the process log for an item that looks like this: As a work-around, you can save that process log to a file, then find item in the file that contains the command to set the diff tool and run it.


2 Answers

Do you have a diff tool installed on your system?

In Mac, when you install Xcode you get a diff tool named FileMerge, simple but sufficient in most of the cases. You can try WinMerge for Windows, I've used it in the past and it's pretty nice, and open source.

You can also try the P4 Merge tool from Perforce which is offered for free.

Both options can be selected as a Diff/Merge Tool in SourceTree.

like image 175
Ricardo Amores Avatar answered Sep 27 '22 21:09

Ricardo Amores


I suggest installing Kdiff3 as a diff tool. It's the best I've seen so far.

Then set it as the diff tool on SourceTree:

  • SourceTree/Tools/Options/Diff

The full tutorial is illustrated here: http://oliverbusse.notesx.net/hp.nsf/tutorial.xsp?documentId=C6A

Note that you must change both values for it to work. Otherwise it failed for me.

like image 25
Michael Fayad Avatar answered Sep 27 '22 21:09

Michael Fayad