2 out of 7 rated this helpful - Rate this topic

How to: Roll Back a Changeset

Though a changeset is a permanent part of the record and technically cannot be undone or removed, you can use the following procedure to effectively roll back a changeset. This procedure is a common way of correcting a check-in mistake.

NoteNote

The following steps refer to file in singular, but the process is the same for a group of files.

Required Permissions

To perform these procedures, you must have the Check out permission set to Allow. For more information, see Team Foundation Server Permissions.

To revert to a prior version of the file

  1. In Source Control Explorer, right-click the file whose changeset you want to roll back, and then click Get specific version on the context menu.

  2. In the Get dialog box, select the prior version of the file, and then click Get. For more information, see How to: Retrieve Old Versions of Files from Changesets.

  3. After this file is in your workspace, right-click the file, and then click Check Out for Edit on the context menu.

  4. Right-click the file again, and then click Check In Pending Changes.

  5. In the Check In - Source Files dialog box, select the file, and then click Check in.

    The Resolve Conflicts dialog box appears.

  6. Click Resolve to open the Resolve version conflict dialog box.

  7. Select Discard server changes.

  8. Click OK.

    NoteNote

    To review your decision before discarding the server changes, you can click Compare to view the server and local copies simultaneously.

  9. In the Resolve Conflicts dialog box, click Close.

  10. In Source Control Explorer, right-click the file, and then click Check In Pending Changes.

  11. In the Check In - Source Files dialog box, click Check in.

See Also

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Seriously?
Who's idea was this process?  Didn't make the bar before release I suppose.
You can show deleted files in Source Control Explorer
"And how, exactly, are you supposed to do this for deleted files? Awesome process, M$ - fools."

In Tools->Options you can turn on viewing deleted files.
Deleted Files?
And how, exactly, are you supposed to do this for deleted files? Awesome process, M$ - fools.


[tfl - 09 02 10] Hi - and thanks for your post. You should post questions like this to the MSDN Forums at http://forums.microsoft.com/msdn or the MSDN Newsgroups at http://www.microsoft.com/communities/newsgroups/en-us/. You are much more likely get a quicker response using the forums than through the Community Content. For specific help about:
.NET Framework : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.dotnet.framework
PowerShell : http://groups.google.com/group/microsoft.public.windows.powershell/topics?pli=1
SQL Server : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.sqlserver%2C&
Visual Studio : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.vstudio%2C&
Windows : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.windows%2C&
All Public : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public%2C&

This process is a joke

Use the Team Foundation Server Power Toys instead.

The command is:

tfpt rollback /changeset:123

You can find more info here:

http://www.google.com/search?q=tfpt+rollback

Rolling back changes on several items
You can get a specific version (prior to the changeset beeing rolled back) by doing the Get Specific version higher on the Source Control Explorer tree (ex. a the project level) but you'll have to check-out and check-in each item/file individually (get the list of files from the changeset).