About the Merge Editor

Use the Merge editor to locate, understand, and resolve merge conflicts in the selected file. The Merge editor provides the same Git functionality that you can access from the command line Git interface.

Description of git_merge_editor.png follows
Description of the illustration git_merge_editor.png

Each Merge editor feature and how you can use it is explained here:

  • Merge Tab

    The Merge tab displays a drop down list of the branches you're working with and the merge strategy Git uses to resolve most merge conflicts. See Change Git's Merge Strategy. A semantic model is comprised of many SMM files, and any merge conflicts that Git can't resolve are listed by file name in the Merge Conflicts pane.

    You can use the Merge tab to cancel all of the merge conflicts that Git couldn't resolve. See Cancel All Merge Conflicts.



  • Branch Panes

    The Branch panes highlight the conflicts between Branch A and Branch B.

    • Branch A - This area highlights the conflicting code from the source (Theirs) branch, which is the branch you're merging from.
    • Branch B - This area highlights the conflicting code from the target (Ours) branch, which is the branch you're merging into.

    Scroll in either pane to locate and review the highlighted conflicts and decide how to resolve them. You can click the branch's Take All button and then go to the Output pane and click Resolve All to use the branch as the source of truth to resolve all conflicts. See the "Output Pane" section below for more information about the Resolve All button.



  • Output Pane

    The Output pane stacks and highlights the conflicting code so that you can compare and select which code to use to resolve the conflict. The highlight colors correspond to branches A (Theirs) and B (Ours) displayed in the Branch panes.

    Use the Conflict up and down buttons to locate and review the highlighted conflicts.

    Description of git_merge_output_panel.png follows
    Description of the illustration git_merge_output_panel.png

    This section describes the buttons you use to resolve the merge conflicts.

    • A and B Buttons

      How you deselect and select the A and B toggle buttons depends on how you need to resolve the conflict. You can resolve an individual conflict by selecting A or B, or by re-ordering a code sequence conflict by specifying the sequence (for example, branch B's code should be located before branch A's code). See Understand How to Resolve Conflicts.


      A and B Buttons

    • Resolve Item Button

      Use this button to resolve one conflict at a time. After you use the A or B button to specify how to resolve the highlighted conflict, click Resolve Item to mark the item as resolved. After you click Resolve Item, the Output pane navigates to the next conflict. See Resolve Individual Merge Conflicts.


      Resolve Item

    • Resolve All Button

      You can use this button in the following ways:

      In the Output pane, use the A and B buttons to navigate to and specify a resolution for each conflict, and then click Resolve All to resolve all conflicts.

      In the Branch pane, click the Take All button in the A (Ours) or B (Theirs) Branch pane and then click Resolve All to resolve all conflicts using the branch you chose. See Resolve All Merge Conflicts.


      Resolve All