Subscribe to RSS

Subversion: How to revert to a previous revision

You’ve been there. You have been developing in your trunk for a while and at revision 127 you get the feeling you’ve done it all wrong! The production server is humming away at revision 123 and that’s where you want to start out again. But how can you start again from revision 123? Easy as this with Subversion

$ svn merge -rHEAD:123 .

This will see what changes you’ve made since r123 up until now (r127 in your case) and ‘undo’ them. Next you check in the code and you’ve go a sweet r128 that is exactly the same as r123. You can start over now!

Please share the love of this post by bookmarking it, and sharing it with others. Thanks!

  • Digg
  • del.icio.us
  • description
  • Reddit
  • Technorati
  • BlinkList
  • E-mail this story to a friend!
  • Facebook
  • Live
  • MisterWong
  • Netvouz
  • NewsVine
  • Slashdot
  • SphereIt

6 Comments

  1. Posted 5 December, 2007 at 09:58 | Permalink

    Thank you so much for telling this! I really appreciate it, because I have looked everywhere on the internet and couln’t find it immediately, thanks!

  2. MJ
    Posted 9 February, 2008 at 11:15 | Permalink

    You just saved my ass

  3. Joseph
    Posted 25 April, 2008 at 15:05 | Permalink

    saved me hours of work =) thanks for the tip bro

  4. Posted 20 June, 2008 at 17:25 | Permalink

    FYI I’ve implemented a GUI method to do this operation in MonoDevelop:

    https://bugzilla.novell.com/show_bug.cgi?id=394434

    Regards.

  5. kaotisch
    Posted 2 July, 2008 at 18:38 | Permalink

    Worked perfectly, thanks :)

  6. Cmyker
    Posted 13 August, 2008 at 10:59 | Permalink

    Many thanks, very helpful post

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*