Skip to main content

Resolve conflicts

Overview

If you have made changes to the same project in different branches, conflicts may occur when you merge the branches.
NDGit provides features to help resolve conflicts in project files.

Conflict Occurrence

Select each conflict location individually

To resolve conflicts by selecting individual changes to apply to each conflict location, follow these steps:

Select changes to apply individually for each conflict location

info

Resolution of each conflict location is available in the Enterprise Edition.
In Professional Edition, resolve conflicts using [Select each model file at once](#Select each model file at once) described below.

Operating instructions
  1. Hover over the file you want to resolve the conflict with.
  2. Click the Conflict Analysis button to display the Conflict Analysis window.
  3. If you hover over the icon in the window, a conflict message will appear. (Click here for message details)
  4. Select the conflict and select the changes you want to make by doing one of the following:
    1. To apply changes from the merged branch, click the Apply Left button.
    2. Click the Apply Right button to apply the changes in the origin branch.
  5. Once all conflicts have been resolved, click the Save & Close button to commit your changes.
note
  • You can undo the applied changes by clicking the Unapply button.
  • If the field value is a string, by clicking the [Merge Text] button, you can apply the text merge of the changes on the other side and your side as the changed contents.
  • By clicking the [Select in Navigator] button, you can check the changes in the model selected in the [Conflict Analysis] window on the Next Design editor.

Select each model file at once

To resolve conflicts by selecting changes to apply to each model file at once:

Select changes to be applied individually for each conflict location

Operating instructions
  1. Select the file you want to resolve conflicts and open the context menu.
  2. Select your preferred changes by doing one of the following:
    1. To apply the changes from the merged branch, click the Apply other's changes button.
    2. To apply the changes from the origin branch, click the Apply my changes button.

List of conflict patterns

Shows all possible conflicts when merging branches. It also provides examples of operations where these conflicts occur and how to resolve them.

No.CategoryConflict messages
1Common to all modelsThe attribute [attribute name] of the element to be deleted is being changed.
2Model commonAttribute [Attribute name] has been mutually edited.
3Common to all modelsOwnership relationships are circular.
4Common to all modelsThere are multiple ownership relationships that own the model name.
5Model (Product Line)Multiple conditional expression models are set.
6Model (Sequence Diagram)Sequence diagrams are mutually edited.
7Profile commonProfiles are mutually edited.

Workaround

  1. The attribute [Attribute name] of the element to be deleted is being changed.

Occurrence conditions

A conflict occurs when one commit deletes a model while the other commit updates a field in that model.

Workaround

Select the model deletion or model field change that you want to apply.

  1. Attribute [Attribute name] is cross-edited.

Occurrence conditions

A conflict occurs when one commit updates a field in the model, and another commit updates the same field to a different value.

Workaround

Select the field change on the side of the model that you want to apply.

  1. Ownership relationships are circular.

Occurrence conditions

A conflict occurs when one commit reparents a model, and the other commit adds a reparenting change that reverses the parentage.

Workaround

Model ownership relationships should not be circular. Specify the application direction so that ownership relationships do not circulate.

  1. There are multiple ownership associations that own model name.

Occurrence conditions

A conflict occurs if one commit adds a model by importing a model file, and the other commit imports the same model file.
Although each model with the same ID is added by import, a conflict occurs because the ownership relationship with the parent is different.

Workaround

A model must have one parent element.
Specify so that only one ownership relationship that you want to apply remains.

  1. Multiple conditional expression models are set.

Occurrence conditions

If one commit assigns a feature to a model (= sets a feature conditional expression), and the other commit also assigns a feature to the same model, a conflict will occur.

Workaround

Only one conditional expression model can be set.
Please specify so that only one conditional expression model that you want to apply remains.

  1. Sequence diagrams are cross-edited.

Occurrence conditions

A conflict occurs when one commit updates a sequence diagram while another commit updates that sequence diagram.
In the case of sequence diagrams, updating different elements within the sequence diagram will result in a conflict.

Workaround

You can check the details of the differences from [View] > [Show differences in editor] on the ribbon.
For sequence diagrams, you must select one change for the entire sequence diagram.
Select the side you want to apply to the interaction model.

  1. Profiles are cross-edited.

Occurrence conditions

A conflict occurs if one commit updates the profile while the other commit also updates the profile.
In the case of profiles, updating different elements within the profile is also a conflict.

Workaround

When it comes to profiles, you must choose one change for the entire profile.
Select the side you want to apply to the root element of the profile.