Solving Merge Conflicts

During merge & rebase operations, conflicts can occur. Although Git is very good at solving most issues by itself there are cases when you have to take action. An example situation is when the same line in the same file was edited in both branches - then you need to tell Git how to solve this issue.

Tower will inform you if you currently have a conflict that needs your attention by showing a small warning sign icon next to the Working Copy item in the sidebar.
Also, the commit area in the Working Copy view is replaced with information about the current status.

To continue working, you must solve the conflicts in all concerned files. Note that when rebasing, multiple merge conflicts can occur in sequence.

You can always abort the merge (or rebase) by clicking the Abort button on the top of the Working Copy view. This resets your HEAD branch to the state it was before the merge began.

Solving a Merge Conflict - Step by Step


 
 

Overview

First, you should get an overview of what happened: How many conflicts need to be solved? What types of conflicts do you have?
Start the resolution by selecting one of the conflicted files in the list.


Resolving Multiple Files at Once

If you want to resolve multiple files at once (or simply don't want to use the visual Conflict Wizard), you can also resolve via the contextual menu. To do so, select the files in the list, right-click and choose one of the options from the Resolve Merge Conflict submenu.