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 should I do it?

1 answer

1 accepted

0 votes
Accepted answer

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
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,129 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