How do I revert all or part of an SVN commit using TortoiseSVN?
Right click on the selected revision(s), then select Context Menu → Revert changes from this revision. Or if you want to make an earlier revision the new HEAD revision, right click on the selected revision, then select Context Menu → Revert to this revision. This will discard all changes after the selected revision.
svn revert will revert not only the contents of an item in your working copy, but also any property changes. Finally, you can use it to undo any scheduling operations that you may have performed (e.g., files scheduled for addition or deletion can be “unscheduled”).
To undo a specific revision you can use the following command: $ svn merge -c -r3745 . In case you have other edited files in working directory, you can commit only the relevant files. Please note that undoing actually will mean you create a new revision with the negatives changes of last commit.
First, you need to identify rather you want to revert back "all changes" of a revision, or just a single file. TortoiseSVN has only the "1 or all" approach; meaning, you can revert back the entire check-in set, or single files: not partial checkins.
So, if reverting back a specific revision (and you want all files in that changeset to be changed), you will want to Right-Click -> TortoiseSVN -> Show log. Find the revision/changeset you want to rollback to, right-click on that revision "Revert to this Revision".
There's another option which might interest you, which is "Revert changes from this revision", which will do a Diff-merge between that revision and your current version, and merge just the differences. I find this more appealing at times; so, I can keep all changes inbetween the changesets.
The other option is to revert a single file back. You would again do Right-Click -> TortoiseSVN -> Show log; but this time, you can select a single file.
TortoiseSVN does not let you select multiple files in a changeset to revert back to. It's either all, or just 1.
For all others reading, make sure "checkins" only involve the files related to that change. This should be common practice these days; but, I still find developers "shotgunning" the checkins at the end of the day, bundling up all changes for the day into a single checkin.
I gleam at those devs with w squint. -_^
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