Hi
I am using SourceTree with Xcode's FileMerge. This has always worked fine. Today, when I right click->resolve using external diff tool, I get a window for a second showing that the launch is happening, and then nothing and the conflict disappears as though resolved. This is really bad as I am unable to merge changes.
Going into preferences, I tried to change the diff tool, but I can't click on any of the values - everything seems to be locked.
Help?
I had the same problem, it turns out it was an Xcode problem
Run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
This worked for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes that worked for me, using FileMerge
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have no idea what this command is doing, but it fixed my problem. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Super! this works for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked for me running SourceTree 2.7.6 (177) and Xcode 9.4.1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, solved by run that magic command.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works great for me, perfectly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked for me. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I came from a clean Mac Installation ... As you said I found the command line tool was not properly configured. Nice catch! Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked for me! Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just a note for anyone else stumbling on this page - this appears to be a Mac thing, not an iOS thing. I'm an Android dev that doesn't much use Xcode, but this was exactly what I needed. Not the first time Xcode has screwed my dev environments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can confirm this worked for me, though had to change path to match my beta xcode location
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked for me, since I've got a clean Mac installation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perfect, worked for me. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked for me, tnx :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked for me, Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also worked for me. Thanks a bunch!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I think what you need to do is:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is still not working for me. THe external diff tool does not launch!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. It work perfect
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In Mac, I had to go to SourceTree/Preferences/General
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This did not work for me. That option is checked, Diff/Merge tool is set explicitly to FileMerge (which is what it was using before it abruptly stopped working), and as recommended in another answer here, I have it set to Embedded Git rather than System Git, but none of that helped at all.
It used to work fine, and then suddenly stopped working a while back, without my having changed any configuration options whatsoever. I'm guessing it was when SourceTree automatically updated itself or something... But anyway, none of the answers in this post have helped for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tested with Sourcetree v2.7.1 and DiffMerge v4.2.1 (with command line tools) on MacOS v10.13.3:
1. Open Sourcetree prefs and select `Diff` tab
2. Set `Visual Diff Tool` menu to `Custom`
3. Set `Diff command` field to: /usr/local/bin/diffmerge
4. Set `Arguments` field to: $LOCAL $REMOTE
5. Close prefs, select External Diff (or cmd-D) and observe DiffMerg launches.
More info here:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do the same for "Merge Command" too.
Merge Command:
/usr/local/bin/diffmerge
Arguments:
--merge --result="$MERGED" "$LOCAL" "$BASE" "$REMOTE"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
None of these worked for me either. Using latest SourceTree with Beyond compare. It doesn't happen on every file. I don't know what the common factor is on the files that it does happen with.
EDIT:
So it turns out the two files I was just trying to merge, the difference was that the file was no longer existent on the remote server. Rather than do something about the merge to show it was deleted, it just hung forever.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This was the right answer. Files no longer exist on remote server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Was the solution for me as well. Can't believe there wasn't a simple error message or something, I spent a lot of time trying all of the other solutions, changing settings, etc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found changing to the Embedded Git rather than System Git fixed the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this resolved my issue as well
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this resolved my issue as well. I had tried with DiffMerge & Beyond Compare. Switching to System Git fixed it for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This resolved my Issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a workaround I changed the name of my external diff app from
/Applications/DiffMerge
to
/Applications/_DiffMerge
Thus my diff command becomes
/Applications/_DiffMerge.app/Contents/MacOS/DiffMerge
with arguments
"$LOCAL" "$REMOTE"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even when I edited the .gitconfig diff tool path and fixed it by removing portion of the path, each time I'd restart DiffMerge, it would reappear.
/Applications/DiffMerge.app/Contents/MacOS/DiffMerge/Contents/MacOS/DiffMerge
So, here's the workaround.
1. Symlink DiffMerge to another location (so it's not auto-detected as DiffMerge)
ln -s /Application/DiffMerge.app /Applications/_DiffMerge.app
2. Then select a custom diff and merge tool arguments.
Diff command arguments:
--nosplash "$LOCAL" "$REMOTE"
Merge tool arguments:
--merge --result="$MERGED" "$LOCAL" "$BASE" "$REMOTE"
After this, SourceTree will no longer mangle the path at startup because it doesn't think it's DiffMerge anymore.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works for me.
Just wanted to note:
ln -s /Application/DiffMerge.app /Applications/_DiffMerge.app
Should be:
ln -s /Applications/DiffMerge.app /Applications/_DiffMerge.app
I can't believe this trivial bug has not been fixed yet.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had same problem.
then I can fix the problem.
I think this is sourcetree bug.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yup, the path to diffmerge had part of it duplicated. Fixing it did the trick. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same problem here. I had to accept the user agreement in the terminal before it would launch from SourceTree. Running 'sudo opendiff' worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This was it for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had this issue on Windows. The problem was caused by an upgrade that inserted backslashes "\" into the merge command arguments.
\"$LOCAL\" \"$REMOTE\"
Should be changed to:
"$LOCAL" "$REMOTE"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ooooooh! A winner! It's been months since external diff worked, I'd been through all the suggestions, saw those slashes but figured it was some sort of necessary string escaping and never considered that might be the cause. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was experiencing this as well, and discovered I'd had a derp moment. The file I was trying to merge had been deleted, therefore there was nothing to merge. :\
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nothing above works anymore for diffmerge. Is there going to be a fix in next release or shall we just try any and every solution?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just posted a reply above that works as off SourceTree v3.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The fix is yet to arrove but there's a workaround at https://jira.atlassian.com/browse/SRCTREE-2211
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If none of these things work, try running `opendiff` in the Terminal.
It there's an error like below you need to do one of two things:
As of writing SourceTree supports the following programs:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yair,
I had the same problem.
As Balazs said, it was because the "System default" was selected for the merge tool. Download a tool and set it as your resolving tool.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.