Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Do you really know how to resolve code merge conflicts?

Shulou Source: shulou.com Published: 2022-06-03 07:45:06 09月23日 Update

Let's first understand what conflict is. A conflict is when the code String str= "aaaa" is modified at the same time, one to become String str= "bbbb" and the other to become String str= "cccc"; this leads to conflicts when the code is merged. If the code merge is from the trunk rebase to the branch, if there is a conflict, it is based on the trunk (to ensure that the existing functions are not affected), then the backbone code will force the code to overwrite the branch. There are 4 files after the conflict (take the pom.xml file as an example):

1.pom.xml-the merged file, if there is a conflict

Tags: Conflict file branch code trunk prompt time prompt place just tripartite that is content at the same time source clear three above not enough Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Linux Microsoft Xiaomi MariaDB