Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to revert a changeset in team foundation server?

I am new to Team Foundation server and someone committed changes that they weren't supposed to the night previous. I need to revert this changeset so that when people get latest version they will not get these changes.

I see no easy way to do this, does anyone have experience with this?

like image 339
Chev Avatar asked Apr 21 '11 14:04

Chev


People also ask

What is rollback entire changeset in TFS?

Rollback entire changeset will give you a set of Pending Changes that when checked in will "undo" what was done in changeset 601. The result is that you will have 3 changesets: 600, 601, 602. And the resulting state will be the same as after 600.

How do you undo a checkin 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).

How do I revert last checkin in TFS?

Without using power tools or command line: ensure Tools->Options->Source Control->Visual Studio Team Foundation Server UNCHECK Get latest version of item on check out. View the history of project folder in Source Control Explorer and right click on the changeset to roll back to and choose Get This Version.


2 Answers

You can't really rollback a changeset. What you have to do is:

  1. Find the changeset number you want to get back to.
  2. Perform a check-out of all the files that is in need of a rollback.
  3. Perform a get specific version (different from get version) and specify the changeset number and select the options to overwrite your local copy with what's in the changeset.
  4. Perform a check-in which would overwrite what is on the server.

You have to do this separately for every file. There you can look at the TFS Power tools which has a rollback that kinda automates the manual steps listed above.

Good luck!

like image 72
tdavisjr Avatar answered Sep 30 '22 00:09

tdavisjr


I think you are looking for the rollback command: Rollback docs

like image 44
Paul G Avatar answered Sep 30 '22 00:09

Paul G