title

fire chief's random developer tidbits

Tuesday, July 12, 2011

Undoing a subversion checkin

These two methods are equivalent for undoing a checkin you screwed up:
svn merge -c -12345   is the same as  svn merge -r 12345:12344
svn merge -c 12345   is the same as  svn merge -r 12344:12345

so after my bad merge I did:
C:\development\trunk\project>svn merge -c -12465 .
which brought the code on my machine back to where it was before the bad commit
then I committed changes as normal
then I did:
C:\development\trunk\project>svn merge -c 12465 .
to check out the changes that I actually wanted

No comments:

Post a Comment