How to roll back a committed change in SVN

| No Comments | No TrackBacks |

A coworker asked me today how to roll back a change that has been committed to SVN. This isn't obvious and the top google searches return irrelevant results. To back out or roll back a change that has already been committed to the Subversion repository, you first merge your commit in reverse, and then you commit. That is, in change 2918, you committed some config files that should not be there. Do this:

% cd config
% svn merge -c -2918 ^/project/trunk/config
% svn ci -m 'revert checkins to config'

This is covered in more detail in Undoing Changes section of the documentation.

No TrackBacks

TrackBack URL: http://kdpeterson.net/cgi-bin/mt/mt-tb.cgi/129

Leave a comment

About this Entry

This page contains a single entry by Kevin Peterson published on March 9, 2010 9:41 AM.

Handy way to monitor multiple HBase logs was the previous entry in this blog.

Inside Automated Sentiment Analysis is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.