[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to "undo" a commit?

From: Larry Jones
Subject: Re: How to "undo" a commit?
Date: Sat, 21 May 2005 20:11:00 -0400 (EDT)

Christian Hujer writes:
> What is the best way to make the HEAD revision of the files being the 
> previous 
> revision?

You want to do a reverse merge to undo the changes and then commit.  To
do that, you'll need to (temporarily) tag the version you want -- I
suggest updating your directory (probably using a date/time) to the
state you want.  Once you've verified that it is, in fact, what you
want, tag it and do the reverse merge.  The sequence would be something

        cvs update -D yesterday
        cvs tag TEMP
        cvs update -j HEAD -j TEMP
        cvs commit -m'undo erroneous checkin'
        cvs tag -d TEMP

Note that if there is any possibility of anyone else having checked in
changes after your erroneous checkin, you should tag the files (with a
second temporary tag) before updating to the previous state and then use
that tag instead of HEAD in the merge to avoid undoing those other

-Larry Jones

They say winning isn't everything, and I've decided
to take their word for it. -- Calvin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]