简体   繁体   中英

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?

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.

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.

Beyond Compare works great too on Mac. It supports Windows and Linux too, but I have not tried.

You can download it from https://www.scootersoftware.com/download.php and make sure you also install command line tools from top menu bar when you open Beyond Compare first time because Source Tree External Diff won't work without command line tools installed

对于较新版本的 SourceTree,通过单击 [⌘ + ,] 打开首选项,然后在 Diff 选项卡下选择您的工具(kdiff3、p4merge 或默认设置为 filemerge)

This may happen due to Sourcetree couldn't fine '.gitconfig' file location. Even if you keep 'Allow Sourcetree to modify your global Git config files' check box ticked. The may not be updated.

Try adding, HOME in your system environment variables to the path of your '.gitconfig' file location. For eg HOME C:\Users\XXX

Please make sure your file is not ignored in the SourceTree's Diff settings pane, textfield Ignore File Patterns .. I couldn't see Gemfile.lock's diff. I kept increasing the file size as per the instruction. I checked the file encoding as mentioned in other answers to similar questions. Turns out that when the file is ignored (by the SourceTree's Diff settings), it will display the same suggestion.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM