I'd like to rollback a change I made recently in TFS. In Subversion, this was pretty straightforward. However, it seems to be an incredible headache in TFS:
How do I rollback to a previous changeset in TFS?
In the local toolbar of the File List, click , then select Undo Check Out (for selected files) or Project > Undo Check Out All (for all files in the project).
To roll back to a specific versionIn Source Control Explorer, select an item, open its shortcut menu, and choose Rollback. In the Rollback dialog box, select Rollback to a specific version.
In the team explorer open up the source control tab, then right click on the route folder and select Check in Pending Changes. This will check in all the files over all the solutions/projects that you have underneath the root. Repeat the process for any other team collections you have used.
The big disadvantage of the tool is that it will want to refresh everything in your workspace before you can merge. I got around this issue by creating a new workspace just for the rollback which mapped directly to the place in the source tree where the affected files were.
If you need help to figure out which changesets to roll back, I find the code review tool in the free Team Foundation Side Kicks add-in very helpful.
Your solution #1 will work: 1. manually get prior version of each file
check out for edit
Checkin the file and Ignore server changes when prompted.
The reason why it failed for you is because you must have the "Get latest version of item on check out" option turned on. Turn this option off by going to Tools...Options...Source Control...Visual Studio Tema Foundation Server and unchecking "Get latest version of item on check out"
Cheers
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