Editing Undoing-a-commit
From BRL-CAD
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | 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 | + | 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" | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |