Differences between revisions 2 and 3
Revision 2 as of 2006-08-02 16:29:05
Size: 745
Comment:
Revision 3 as of 2009-09-20 22:12:01
Size: 747
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
This is quoted from [http://www.schwer.us/journal/2005/09/04/subversion-backing-out-a-committed-change/ this blog] This is quoted from [[http://www.schwer.us/journal/2005/09/04/subversion-backing-out-a-committed-change/|this blog]]

This is quoted from this blog


You just committed a change to the repository and now you realize it was a mistake; how do you back your changes out in the working copy and recommit the corrected version?

Easy; use the merge subcommand which can create and apply a diff between two revisions.

Say the oops code lies in version 198 and you want to back your changes out to version 197, then use merge like so:

svn merge -r198:197 myfile.java

Notice how the is from 198 to 197, so the changes will be backed out.

Now commit the corrected version back in to the repository:

svn commit -m ‘Backed out that nasty divide by zero…’

HowToBackOutaChange (last edited 2009-09-20 22:12:01 by localhost)