Resolving code conflicts
If the commit appears "you had to update your work copy first." A red warning indicates that the file in the repository has been modified by someone else.
Please exit by clicking the "OK" button first. Execute update, and then commit.
If the modifications do not conflict with the code that was obtained by the update, they are merged automatically.
If a conflict (such as a modification to the same line of code) occurs, "one or more files is in a conflicted state." Red warning, and produces several file record conflicts.
In general, we do not edit the conflicting files directly. Instead, manually resolve the conflict by following the steps below.
In Explorer, select the file that conflicts with commit, and the right mouse button menu select "Edit conficts".
The interface, which is divided into "theirs", "Mine" and "merged", is part 3, which means "content modified by others", "What I have Modified" and "merged results" 3. We are going to "don't
People modify the content "and" I modify the content of the trade-offs, to form a "merged results."
The merger is generally divided into 4 situations:
1. Keep "My Changes" and discard "other people's changes". Right click on the corresponding line of the mine box and click "Use this text block".
2. Discard "My Changes" and keep "other people's changes". Right click on the corresponding line of the theirs box and click "Use this text block".
3. Also keep "My Changes" and "other people's changes", and put "My changes" in front. Right click on the corresponding line of the mine box and click "Use text block from mine before theirs".
4. Also keep "My Changes" and "other people's changes" and put "other people's changes" in front. Right click on the corresponding line of the mine box and click "Use text block from theirs before mine".
Merge complete, ctrl+s disk, exit.
Then, in Explorer, select the conflict file, the right mouse button menu select "Resolved", and the tag conflict is resolved. Files created by the conflict are automatically deleted.
At this point, you are ready to proceed with the commit operation.
Svn:one or more files is in a conflicted state