Why is "resolve using theirs" not available in SourceTree?

I have a merge conflict of some binary files in SourceTree, and I want to just discard my changes and use the latest version committed to git. Normally I would do this by selecting: Resolve Conflicts | Resolve Using 'Theirs'

However, this option is greyed out in the menu and can't be selected. My only option is to Resolve Using 'Mine', but I don't want to do that. Why would this happen?

Trying to reset the file while in this state also fails, saying the file 'is unmerged'.

Selecting Resolve Using 'Mine' removes the file from my pending changes list, which is also confusing; shouldn't the file now be the locally modified version?

2 answers

1 accepted

Hmm, the Resolve Using Theirs option is enabled when SourceTree detects that you're in a merge situation (or rebase actually), ie that there's more than one parent to the current working state. If it's disabled, it suggests it thinks that's not the case. Did the conflict come from something other than a merge/rebase action, such as a patch or stash? Unfortunately there's no context in that case, although the usual default behaviour in that case for binary files is for the default state to be 'theirs' anyway, so if it looks OK you can just use 'Mark Resolved'.

'Resolve using Mine' puts the file into the state on the branch you're on, so it's not modified any more, that's why it doesn't show up after you do that.

OK I think I get it. All I did was a pull with "commit merged changes immediately" enabled, which resulted in a conflict with a locally modified (but not committed) file.

So in this context Resolve Using 'Mine' must refer to the latest commit in the local repository (which would be the thing that just got pulled) and not my working copy. I supposed technically they are both 'mine' at that point, but one is more 'mine' than the other lol.

Ah, I see. The moral of this story is to commit before you pull, everything's much cleaner that way :)

Hi guys, sorry for the noob question - I actually think I want something similar to 'resolve using mine' but it's grayed out for me. As the devs here use both windows and mac, we use Github>Sourcetree>Unity>Xcode (for us Mac kids). At the Unity part, we Mac users install 2 plugins which resolve some errors for us.

My problem is that every time I change a branch I must re-import the plugins to Unity (and change many of the build settings back to what I need!). I am simply a tester (for now....!) and so don't code or push anything to the repo. What I want is for SourceTree to STOP trying to pull the following files (which I assume to be those changed by the plugins since I don't code diddly) but still pull everything else.

The error thrown is...
This file is different and stuff: (Commit or stash you noob!) SGMultiplayerClient/Assets/lib/MyFileLogic.dll.mdb

Any suggestions? Sory to hijack.

You can probably just add that file to your .gitignore file, then git won't track it anymore.

I think I tried this but I'll try again... for reference, do I just put the full path to the file or will I need some sort of operator? Like '!' or a wild card *?

you can use a wildcard: *.mdb

or you can use a path to the file relative to the .gitignore file

Hi guys, sorry for the noob question - I actually think I want something similar to 'resolve using mine' but it's grayed out for me. As the devs here use both windows and mac, we use Github>Sourcetree>Unity>Xcode (for us Mac kids). At the Unity part, we Mac users install 2 plugins which resolve some errors for us.

My problem is that every time I change a branch I must re-import the plugins to Unity (and change many of the build settings back to what I need!). I am simply a tester (for now....!) and so don't code or push anything to the repo. What I want is for SourceTree to STOP trying to pull the following files (which I assume to be those changed by the plugins since I don't code diddly) but still pull everything else.

The error thrown is...
This file is different and stuff: (Commit or stash you noob!) SGMultiplayerClient/Assets/lib/MyFileLogic.dll.mdb

Any suggestions? Sory to hijack.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Uncategorized

Friday fun: how many celebrates Midsummer holiday or is this a Swedish tradition only?

Any other country that celebrates Midsummer holiday (this friday 22 June)?  

44 views 3 1
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you