Resolve SVN Conflicts

Robert makes changes to the file urbdb.txt, but does not yet commit those changes. Meanwhile, Harry commits changes to that same file. Robert updates his working copy before committing and he gets a conflict, which he postpones:

$ svn update
Conflict discovered in 'urbdb.txt'.
Select: (p) postpone, (df) diff-full, (e) edit,
        (mc) mine-conflict, (tc) theirs-conflict,
        (s) show all options: p
C    urbdb.txt
Updated to revision 2.
Summary of conflicts:
  Text conflicts: 1
$ ls -1
urbdb.txt
urbdb.txt.mine
urbdb.txt.r1
urbdb.txt.r2

At this point, Subversion will not allow Robert to commit the file urbdb.txt until the three temporary files are removed:

$ svn commit -m "Add things"
svn: Commit failed (details follow):
svn: Aborting commit: '/home/robert/svn-work/urbdb.txt' remains in conflict

If you’ve postponed a conflict, you need to resolve the conflict before Subversion will allow you to commit your changes. You’ll do this with the svn resolve command and one of several arguments to the --accept option.

If you want to choose the version of the file that you last checked out before making your edits, choose the base argument.

If you want to choose the version that contains only your edits, choose the mine-full argument.

If you want to choose the version that your most recent update pulled from the server (and thus discarding your edits entirely), choose the theirs-full argument.

However, if you want to pick and choose from your changes and the changes that your update fetched from the server, merge the conflicted text “by hand” (by examining and editing the conflict markers within the file) and then choose the working argument.

svn resolve removes the three temporary files and accepts the version of the file that you specified with the --accept option, and Subversion no longer considers the file to be in a state of conflict:

$ svn resolve --accept working urbdb.txt
Resolved conflicted state of 'urbdb.txt'

Link with more details.