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.
Note |
|---|
| 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
-
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.
-
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.
-
After this file is in your workspace, right-click the file, and then click Check Out for Edit on the context menu.
-
Right-click the file again, and then click Check In Pending Changes.
-
In the Check In - Source Files dialog box, select the file, and then click Check in.
The Resolve Conflicts dialog box appears.
-
Click Resolve to open the Resolve version conflict dialog box.
-
Select Discard server changes.
-
Click OK.
Note To review your decision before discarding the server changes, you can click Compare to view the server and local copies simultaneously.
-
In the Resolve Conflicts dialog box, click Close.
-
In Source Control Explorer, right-click the file, and then click Check In Pending Changes.
-
In the Check In - Source Files dialog box, click Check in.
See Also
- 12/16/2011
- ToolMakerEd
In Tools->Options you can turn on viewing deleted files.
- 5/2/2011
- SamCPP
[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&
- 7/14/2008
- Reow
- 2/9/2010
- Thomas Lee
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
- 6/17/2008
- Tatham
- 3/14/2007
- Tiago Dias