How to change HEAD revision to a previous revision in your SVN repository

Tuesday, 27 September 2011 20:43 by myro

Can happen that you have commited something wrong into your Subversion repositoy and you want to set your Head revision to a specific revision. 
The following steps will illustrate how can you change it.

  1. Checkout your repository
    svn checkout http://url
  2. move to your working copy folder
    cd folder
  3. do a reverse merge (i'm reverting to revision 1269)
    svn merge -r HEAD:1269 .
  4. now that youry working copy is set to rv 1269, you need to commit to update the repository
    svn commit -m "set head revision to r 1269"

That's it. Now your head revision will reflect the r 1269.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:  
Actions:   Bookmark and Share | Permalink | Comments (0) | Comment RSSRSS comment feed
If you consider this post usefull for your purposes, please consider visiting my sponsors to help me out with the myrocode.com maintenance. Thank you.