Revert a Single Commit in Subversion

By Jimmy Bonney | June 10, 2012

Reverse mode

There are quite a few SVN commands that I do not use so often but that I need every once in a while. One of them is related to reverting a single commit.

If some code has been committed to the repository but you then realize later that those changes should not have been commited for some reason (code breaks some functionalities, tests not running, …), it is possible to execute a reverse merge.

In order to revert a single commit in the working copy, one can simply use the following syntax:

1
svn merge -c -N .

where N is the revision number that needs to be reverted.



For the time being, comments are managed by Disqus, a third-party library. I will eventually replace it with another solution, but the timeline is unclear. Considering the amount of data being loaded, if you would like to view comments or post a comment, click on the button below. For more information about why you see this button, take a look at the following article.