Eclipse SVN conflict detailed solution

     Everyone develops together, and it is inevitable that sometimes the same file will be modified at the same time, so we must learn to resolve conflicts. When you update the code and find the following situations, it means that your modified file conflicts with the server file (usually someone else has changed the same file).
1) Conflicting files with the server:
2) After clicking Update, if the following situation occurs (four files appear), it means that the conflict needs to be resolved.

How to resolve conflicts:
When there is a file conflict: you have four options:
1 Subject to what I modified, regardless of the current version of the server, for example, another colleague and I modified the same place at the same time, but I think I wrote it better:
1) Right-click the conflicting file and select Mark Resolved:

2) Select the second one (Resolve the conflict by using my version of the file.) in the pop-up box, and click OK.


2 Select the latest version of the server. For example, I originally wanted to change this file, but later found that my colleague has already changed it, so I can choose this:
1) Right-click the conflicting file and select Mark Resolved:
2) Select the third one (Resolve the conflict by using the incoming of the file.) in the pop-up box, and click OK.

3 Select the basic version of the server. This situation is relatively rare. For example, I changed it. Later, others said that this function was not done, and other colleagues had to cancel the modification, so you can choose this:
1) Right-click the conflicting file and select Mark Resolved:
2) Select the fourth one (Resolve the conflict by using base version of the file.) in the pop-up box, and click OK.

4 This situation is relatively common, mainly in this file, my colleague also needs to change it, and I also need to change it, so we need to edit the conflict, and combine our two files into one:
1) Right-click the conflict file and select Edit Conflicts:

2) In the pop-up box, merge the two files, the one on the left shall prevail. After merging, save.

3) Select the first one (Conflicts have been resolved in the file.) in the pop-up box, and click OK.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325814147&siteId=291194637