[svn] Reverting to a previous revision using TortoiseSVN

What is the easiest way to revert my working copy to a previous revision using Windows TortoiseSVN?

I did not find any "findable" command to do that quickly.

This question is related to svn tortoisesvn revision revert

The answer is


In the TortoiseSVN context menu, select 'Update to Revision', enter the desired revision number, and voilà :)


The Revert command in the context menu ignores your edits and returns the working copy to its previous state. You may also select the desired revision other than the "Head" when you "CheckOut" from the repository.


I have used the same instructions Stefan used, taken from Tortoise website.

But it's important to click COMMIT right after. I was getting crazy until I realized that.

If you need to make an older revision your head revision do the following:

  1. Select the file or folder in which you need to revert the changes. If you want to revert all changes, this should be the top level folder.

  2. Select TortoiseSVN ? Show Log to display a list of revisions. You may need to use Show All or Next 100 to show the revision(s) you are interested in.

  3. Right click on the selected revision, then select Context Menu ? Revert to this revision. This will discard all changes after the selected revision.

  4. Make a commit.


Here's another method that's unorthodox, but works*.

I recently found myself in a situation where I'd checked in breaking code, knowing that I couldn't update our production code to it until all the integration work had taken place (in retrospect this was a bad decision, but we didn't expect to get stalled out, but other projects took precedence). That was several months ago, and the integration has been stalled for that entire time. Along comes a requirement to change the base code and get it into production last week without the breaking change.

Here's what we did:

After verifying that the new requirement doesn't break anything when using the revision before my check in, I made a copy of the working directory containing the new code. Then I deleted everything in the working directory and checked out the revision I wanted to it. Then I deleted all the files I'd just checked out, and copied in the files from the working copy. Then I committed that change, effectively wiping out the breaking change from the repository and getting the production code in place as the head revision. We still have the breaking change available, but it's no longer in the head revision so we can move forward to production.

*I don't recommend this method, but if you find yourself in a similar situation, it's a way out that's not too painful.


Right click on the folder which is under SVN control, go to TortoiseSVN ? Show log. Write down the revision you want to revert to and then go to TortoiseSVN ? Update to revision....

Enter image description here


Examples related to svn

Error "can't use subversion command line client : svn" when opening android project checked out from svn How to view changes made to files on a certain revision in Subversion Intellij idea subversion checkout error: `Cannot run program "svn"` How change default SVN username and password to commit changes? How to rename a file using svn? Connect Android Studio with SVN svn: E155004: ..(path of resource).. is already locked SVN Commit failed, access forbidden How to add an existing folder with files to SVN? Update OpenSSL on OS X with Homebrew

Examples related to tortoisesvn

TortoiseSVN icons overlay not showing after updating to Windows 10 Error "can't use subversion command line client : svn" when opening android project checked out from svn SVN Commit failed, access forbidden SVN commit command svn cleanup: sqlite: database disk image is malformed SVN Repository on Google Drive or DropBox Resolving tree conflict SVN icon overlays not showing properly Working copy locked error in tortoise svn while committing Subversion stuck due to "previous operation has not finished"?

Examples related to revision

Go to particular revision Reverting to a previous revision using TortoiseSVN How do I view an older version of an SVN file? How to clone git repository with specific revision/changeset? How do I get the Git commit count?

Examples related to revert

How do you revert to a specific tag in Git? How do I revert an SVN commit? How do I "un-revert" a reverted Git commit? git revert back to certain commit Reverting to a previous revision using TortoiseSVN Remove specific commit Reverting single file in SVN to a particular revision How can I revert a single file to a previous version? Mercurial — revert back to old version and continue from there git status shows modifications, git checkout -- <file> doesn't remove them