Fixing git merge conflicts : discard selected lines always resets my view?

I'm trying to fix git merge conflicts on my .xcodeproj file. Since I want to accept changes from both merged branches, this involves me selecting the various git inserted data (<<<<<<< HEAD, >>>>>>> BRANCH, and ======) and using "discard selected lines" to fix the merge conflict. Each time I discard a line, the view resets and HEAD is selected in the commit tree. As you can imagine, having to scroll down the same file for the 10th time to discard one line at a time is not very user friendly.

I'm guessing I must be going about resolving conflicts in the xcodeproj the wrong way...how should I do it?

1 answer

1 accepted

You're actually far better to use an external merge tool to do this. FileMerge (free with XCode) does an admirable job and is the default configuration, you can just right-click the conflict and select Resolve > Resolve in Visual Merge Tool. Then you can resolve all the conflicts at once (discarding if you want) before returning to SourceTree.

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
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

430 views 0 1
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