Search code examples
svnrevert

Is there any way "svn unrevert"?


Ack! I just mistakenly ran "svn revert somefile" with the wrong filename pasted in. Now my nicely modified file is gone!

I'd like a "svn unrevert" command. AFIK there's no such thing. What is the next best way out of this mess?


Solution

  • There's no way to un-do a revert. You can revert because Subversion keeps a copy of the original file inside the .svn folder, and when you run the revert command the backup copy is copied over the file in your working copy. Subversion doesn't back up your modified file before it performs the revert, so unless you made a copy of it somewhere you are probably out of luck.