Merging a single file?

Hi,

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 Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

238 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot