AnkhSVN wasn't working when I did Update to a Specific Version
, I kept getting an error message about "please update the out of date items and then retry commit". After some trial and error I figured out how to undo a committed file using the command Revert to this revision
.
Say for example you are at revision 4440 and you want to make 4435 the new head. Use Revert to this revision
to discard all changes after the selected revision.
How to make a prior committed version the new HEAD revision
NOTE: You may want to revert an entire a solution, but keep a couple changes made in the "un-done" revisions. If that's the case before you revert you could: copy out the newer files to a temporary location, do the revert, then copied them back in to revert everything but keep a few changed at the desired state.
Below is how to undo/revert a committed change
with both ANKH and Tortoise.
ANKH
With solution open in Visual Studio, Right click context menu
(this can be a Solution, Project, or any specific file) > View History
> Select revision
> context menu
> Revert to this Revision
.
ToirtoiseSVN
In file explorer right click on the file or folder
(this could even be the top folder if you want to do a mass undo): Show Log
to display a list of revisions, select a revision, then select Context Menu
→ Revert to this revision
. Then at the top folder level do Commit
, and all of the items will be reverted.