Undo Changeset in Team Foundation Server Version Control — TFS Power Toys

Ed Blankenship
EdSquared
Published in
2 min readOct 26, 2006

Update: If you are wanting to learn how to undo or rollback a changeset using TFS 2010, visit my new blog post about this topic here: http://www.edsquared.com/2010/02/02/Rollback+Or+Undo+A+Changeset+In+TFS+2010+Version+Control.aspx

So… I really needed to undo a changeset that was previously made by another user and started looking around for it. I knew you could do it but just hadn’t ever had a need for it. I figure I start right-clicking different places in Source Control Explorer but that didn’t lead me to anything :(

Until I remembered there were cool new features in the Team Foundation Server Power Toys. Once of which was an undo changeset command. Take a look at them because I know you will find several features handy. One of my favorites in there as well is Annotate. (Thanks to Dave McKinstry for previewing that one to us!) It’s basically a solution to point-the-finger game for changes… It will show a bar on the side next to every line that shows who the last person was that edited it, date/time, and the changeset number. You can even double-click on the changeset number and the actual details of the changeset will pop-up. Very handy!

Other features in the power toys package: (taken from the documentation)

Unshelve Command
Use the unshelve command to unshelve and merge the changes in the workspace.

Rollback Command
Use the rollback command to roll back changes that have already been committed to Team Foundation Server.

Online Command
Use the online command to create pending edits on writable files that do not have pending edits.

GetCS Command
Use the GetCS (Get Changeset) command to get the changes in a particular changeset.

UU Command
Use the UU (Undo Unchanged) command to undo unchanged files, including adds, edits, and deletes.

Annotate Command
Use the annotate command to download all versions of the specified files and show information about when and who changed each line in the file.

Review Command
Use the review command to optimize the code review process to avoid checking in or shelving.

History Command
Use the history command to display the revision history for one or more files and folders. The /followbranches option returns the history of the file branch’s ancestors.

Workitem Command
Use the workitem command to create, update, or view work items.

Query Command
Use the query command to run a work item query and display the results. If you do not provide a specific query, all the active work items assigned to you are displayed.

TreeDiff Command
Use the treediff command to display a visual representation of the differences between files in two server folders, in a server folder and a local folder, or in two local folders.

Ed B.

--

--

Ed Blankenship
EdSquared

Product Director at Akeneo | Formerly at Contentful, Algorithmia, and Microsoft in DevOps