Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Unfortunately, I cannot explain exactly what happened. The result is the following: In my repository I have a file for which the correct version is HEAD-1. How can I create a new revision, such that the only difference between HEAD and HEAD+1 is that in HEAD+1 is the one from HEAD-1. All other elements of the repository should be identical in HEAD+1 to those of HEAD.

By invoking

svn update -rHEAD-1

I obtain a working copy which is the one I want to become HEAD+1. However, svn status doesn't show anything.

I hope my question make some sense...

share|improve this question
up vote 1 down vote accepted

From what I understand, although the rest of the changes in your HEAD revision are fine, you did a mistake in and you want to retrieve that for your next revision. Here's how:

Take a snapshot of your from the previous revision, using the command you have specified

svn update -r HEAD-1

Then, make a copy of this file and save it as


Restore the file to your current revision

svn update -r HEAD

Then, copy over your saved (and correct version of) to overwrite the current messed-up version


Commit it back in as revision HEAD+1

svn commit -m "Restoring from older revision HEAD-1"

Hope that helps, Sudipta

share|improve this answer
I guess this is a classical example of KISS (=Keep It Stupid Simple). I thought I should use some fancy-svn-trick... Thanks a lot! – Dror Aug 12 '11 at 5:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.