Merging a single file?


I've been using your product for a while now and I'm loving it. I do have one question, however: When merging, if another developer and I are working on the same file, it causing a conflict and we have to choose one or the other and one of us will end up losing the work. Is there a way to merge a single file into itself and keep both developers changes?

Thank you for any help!

1 answer

Sure, when you merge (so after you've pulled changes and either have 2 heads in Mercurial which you merge, or in git if the merge has already got conflicts), just right-click on a file which has conflicts and select 'Resolve Conflicts > Launch External Merge Tool'. The default is FileMerge, and you can then go through each change and resolve the merge by combining the changes or choosing one or the other in each case within the file.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,210 views 4 2
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