Skip to content

Conflict Resolution

Maurits Kok edited this page Mar 16, 2021 · 3 revisions

A conflict arises when two separate branches have made edits to the same line in a file, or when a file has been deleted in one branch but edited in the other. Conflicts will most likely happen when working in a team environment. In general, the probability of encountering conflicts can be reduced by creating small pull requests and avoid working in evermore diverging branches.

During a pull request, GitHub will show whether the merge will produce conflicts [1]. If the conflicts are minor and in text-based files, they can be resolved on GitHub. Otherwise, the conflicts need to be addressed locally via a Command Line Interface (a terminal). GitHub will show instructions on how to proceed when this occurs.

MATLAB has also developed tools to integrate version control with git [2]. This is mainly important for specific MATLAB binary files, such as the GUI. These files cannot be properly inspected for version control without using MATLAB R2020b [3].

References

[1] https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line
[2] https://nl.mathworks.com/help/simulink/source-control-in-simulink-project.html?s_tid=CRUX_lftnav
[3] https://nl.mathworks.com/help/matlab/matlab_env/compare-and-merge-apps.html

Clone this wiki locally