Undoing-a-commit

From BRL-CAD
Revision as of 17:48, 23 May 2012 by Tbrowder (talk | contribs) (New page: Sometimes one may inadvertently commit a change that was not intended. For example: $ svn ci test_vls.c ... revision: 9999 We want to "uncommit" the change. But if we don't want to los...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Sometimes one may inadvertently commit a change that was not intended. For example:

$ svn ci test_vls.c ... revision: 9999

We want to "uncommit" the change. But if we don't want to lose the changes we made, we either need to copy the changed file(s) to an unversioned directory or save the differences before we commit the First get the URL of the trunk:

$ svn info ...https://brlcad.sf.net/brlcad/trunk

Do the merge:

$ svn svn merge -r9999:9998 https://brlcad.sf.net/brlcad/trunk

Check that the trunk has changed to the state before the bad commit:

$ svn diff

httpshttps://brlcad.svn.sourceforge.net/svnroot/brlcad/brlcad/trunk

svn commit -m"undoing bad commit rev 50643"