I\'m fairly new to SVN and I\'ve never had to revert back to a previous revision, although I can get a copy of a revision from the repository okay. I\'m using TortoiseSVN a
It's a common use for svn merge
.
You need to specify a reverse difference (e.g. --revision 303:302
or by an equivalent --change -303
):
svn merge -c -303 http://svn.example.com/repos/calc/trunk
What you need is a so-called reverse merge:
svn merge -r HEAD:<rev_you_want_to_revert_to>
See the Tortoise SVN merge documentation for details on how to do that with Tortoise SVN. Also see the SVN book (copied link from another StackOverflow question; it's actually a FAQ).
The easiest way to do that with TortoiseSVN:
The former of those two commands reverts the working copy to the state it was in that revision, while the latter only reverts the changes of that specific revision withour reverting later changes too.