It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Resolve using "theirs" vs "mine" - what is the difference?

I'm confused by the working when you resolve conflicts. What does "theirs" refer to and what does "mine" refer to?

Which version is kept by the two options?

5 answers

1 accepted

Hi Thomas,

I believe that you're talking about Git, right?

When you have conflict between your file and the file that you're merging, you have two choices:
"Mine" - Your file will be used to solve the conflicts
"Theirs" - The Target file will be used to solve the conflicts.

It depends on what you need to use to solve the file conflict.

Kind Regards,
Henrique Lechner

When I merge a branch into the current one, is "Mine" the current branch and "Theirs" the branch I'm merging into the current?

Actually the opposite:
Mine = The file that I'm merging into the current
Theirs = The current

Like 1 person likes this

Oh... then it was good I asked first. Because that wasn't obvious to me. I wasn't able to find any references that described this either.

Is this the wording normally used for such operation? Is there perhaps more clearer wording? Or am I the only one to find this confusing?

Like 1 person likes this

I'm having hard time digesting this. In my opinion the initial answer says the exact opposite of the comment.

Let's say we have two branches branch1 and branch2. Assume we are in branch2 and we merge the last commit of branch1 into the branch2 and we get conflicts. Now:

  1. Which branch is "Mine" and which one is "Theirs"??
  2. If I want to accept everything from branch1, which button should I press??

 

Like 1 person likes this

Hi I'd just like to point out that Henrique's answer is incorrect for SourceTree 2.5.2 (current as of June 2017) per my understanding and experience (perhaps I misunderstood). This is a git repo.

Here is the state before merge: branch v4 has all the new stuff, branch develop is behind. I'm merging v4 into develop.

Current branch: develop
Merge v4 -> Develop

Mine == Use the file as it is in Develop, ie. the same branch I am in

Theirs == Use the file as it is in v4, ie. the branch I am not in

This makes sense to me (it's what I expected), but appears to be the opposite of Henrique's answer.

 

Like 3 people like this

I just gave it a shot and at least when applying stash it seems to work the way you describe it:

mine: uses the file in the currently active branch

theirs: uses the file from the stash

Like 2 people like this

"mine" and "theirs" is horribly confusing, and seems to vary depending on whether you're doing a merge or a rebase.

So confusing that I always have to use an external merge tool to get it right.

Please change this to use the branch names or commit IDs instead.

Like 2 people like this

We beg you to do this!!.. Messed and confused many times. Plzzz..

Or use a less vague pair of words like VS Code have done:
Current VS Incoming

Like 1 person likes this

This problem has been well-known—yet ignored—for many years: https://jira.atlassian.com/browse/SRCTREE-1579

This is still not resolved ahaha.

Ok, here is a work around source tree.

- Open the panel that shows conflicting files in source tree.

- Open visual studio code
- Drag the conflicting file from source tree into VSCode.
- Resolve conflict
- Back in source tree and stage the file.

Can I +1 this? Not only does the UI use "mine" and "theirs", but when merging using a diff tool it creates temp files names myfile.LOCAL.txt  and myfile.REMOTE.txt .. so mine is local, and theirs is remote?

 

Why not just have "resolve using branchname1" and have the file called myfile.branchname1.txt in the resolve tool, and "resolve using branchname2" and have the file called myfile.branchname2.txt in the resolve tool?

This was resolved elegantly in vscode!

just wish VS Code had the option to resolve all conflicts in a file using Current Changes, Incoming Changes or Both Changes

Like 1 person likes this
Like 1 person likes this

Thanks, it's help

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Apr 09, 2019 in Feedback & Announcements

Atlassian Community: the whole is greater than the sum of its parts

This week at Summit we announced an exciting rebrand of two major elements of our community. Read on for details and jump in with questions! In 2006, a group of ~80 Atlassian users in Virginia got ...

2,259 views 15 38
Read article

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