14

I am using bitbucket to manage my code version with third party tool SourceTree. There are two option to resolve Conflicts;

  • Resolve Using Mine
  • Resolve Using Theirs.

How these options work I am totally confused. Can someone please explain the difference between these two options?

TouchStarDev
  • 421
  • 2
  • 7
  • 19

1 Answers1

0

'Mine' refers to the changes that you just made . ‘Theirs’ would refer to the changes made by the other team member.

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.

Vaibhav Agrawal
  • 714
  • 2
  • 6
  • 10
  • 4
    when I apply Resolve using Mine its take the working of other member and when I apply Resolve Using Theirs its take my work. – TouchStarDev Apr 25 '18 at 10:16
  • 2
    This is incorrect - see the linked duplicate. – BJ Myers Apr 27 '18 at 15:43
  • 3
    @TouchStarDev if you are rebasing then ours/theirs is reversed. See https://stackoverflow.com/a/25576672/667773 – Denes Papp Dec 22 '18 at 00:28
  • 21
    'Mine' is always the branch git's HEAD is pointed at, 'Theirs' is the code being merged. Where git's HEAD is pointed depends on whether you're doing a Merge or a Rebase. If you're doing a merge, git's HEAD is pointed at your branch, so 'Mine' is your branch and 'Theirs' is the branch being merged. If you're doing a rebase, git's HEAD is pointed at a new branch it is making based off the branch you're rebasing to, so 'Mine' is the new branch you're making (i.e., the old code) and 'Theirs' is what is being merged in (i.e., your code). – Katie Kilian Apr 04 '19 at 15:05
  • 1
    "'Mine' refers to the changes that you just made" I haven't made any file changes, I'm merging two branches. – Alex Dec 28 '21 at 10:07
  • 1
    I should have read the comments. Vaibhav messed me up big time. Thanks Katie for the proper answer, you should post that as an official answer for sure! – Adam Feb 10 '22 at 21:48