How to resolve a conflict during a rebase in Visual Studio – 115

Similar to yesterday’s tip, but today, you’ll see how to resolve a conflict when rebasing within Visual Studio.

Suppose you have the same line in the same file modified in different branches. Just something simple to trigger a merge conflict. Or more likely, you’ve added one file in master and you’ve added another file in an experiment branch. Then you get a conflict when rebasing because your project file needs help merging the two newly added files.

First, you’ll get the message that there are conflicts.

conflicts message in Team Explorer

Click on the Conflicts: 1 link.

resolve conflicts window in Team Explorer

Clicking on the Merge button will bring up the built-in merge tool.

Make whatever selections you want, and then hit Accept Merge.

Accept merge in VS tool

Now View Changes, as you’ve resolved the conflicts, but still need to finish the rebase.

resolve conflicts - view changes

And finally finish the rebase! (For some reason, I can’t stop hearing the Mortal Kombat game in my head.)

rebase in progress - continue

And now you’ll see that the experiment branch has been merged onto master.

experiment pointer above master pointer

3 thoughts on “How to resolve a conflict during a rebase in Visual Studio – 115

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s