A partner and I are using svn for a partner project for a class, and we initially went the wrong direction with the code in our trunk. We got to revision 129 before realizing we would be better off starting over from revision 113, and going a different direction.
On my own computer I checked out revision 113, made the changes, and want to commit the code I have. However, when I try to commit I get this:
svn: Commit failed (details follow):
svn: File or directory 'Robot.cpp' is out of date; try updating
svn: resource out of date; try updating
The problem is, I don't want to update. I don't want all the changes we made from revision 113 to 129, and basically want to replace all the code in the repository with what I have locally. How would I do this?
Being at the root of your working copy, you can issue the following command:
svn merge -rHEAD:113 .
This will 'undo' all your changes from revision 113 so that your revision 130 will look like revision 113.
Don't forget to commit afterwards though.
svn merge -c 113
and then svn commit -m
"rolledback to 113"
.svn update
svn commit
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With