How to undo a merge (without commit)?

I just did an svn merge to merge changes from the trunk to a branch:

$ svn merge -r328:HEAD file:///home/user/svn/repos/proj/trunk .
--- Merging r388 through r500 into '.':
A    foo
A    bar
   C baz1
   C baz2
U    duh
[...]

But there were too many conflicts, so I'd like to undo that.

One way to do that is to commit and then merge back. But I can't commit because of the conflicts. What's the best way to undo in that case?


Revert recursively from the top of your working copy:

svn revert -R .

You will need to manually delete the files that were added. As in after reverting, the files added will remain on disk but they will be in a non-tracked state ("? foo")


As long as you haven't commited, you can always do a revert to undo all your changes.


I faced the same situation, also I had some other changes which I didn't wanted to lose. So, instead of full recursive revert just svn revert for the conflicted items was good for me

svn revert baz1 baz2