Resolve Conflicts in Models Under Source Control - MATLAB & Simulink (original) (raw)

Main Content

Conflicts in Simulink® model files can occur when multiple team members work simultaneously on the same model and when keeping both changes in the merged model is not possible. The user must make a decision on which change they want to keep by resolving the conflict in the model file. For example, a conflict occurs when two users change the value of a parameter in two different Git™ branches. Another example is when one user modifies the structure of the model, by deleting a block, and another user on a different Git branch modifies the same block. A conflict occurs in the model file, and the user must make a manual change to fix the merge.

Development practices and model architecture can greatly affect how often model file conflicts occur. Follow these best practices to minimize model conflicts.

Follow these steps to resolve conflicts in an example collaborative workflow:

  1. Make Changes and Merge Git Local Branch
  2. Identify Order of Resolving Conflicts in Changeset
  3. Resolve Conflicts in Models Using Three-Way Merge

You can use the files provided at any of these steps to follow the instructions in the example.

See Also

Simulink Three-Way Merge Tool

Topics