Rollback or Undo a Changeset in TFS 2010 Version Control

Updated – 8/19/2011 – New Rollback Features Available in the UI with TFS 2010 Power Tools (See Below for More Details)

One of the new features for TFS 2010 Version Control is the ability to rollback or undo a changeset or check-in inside the product and see it as a new pending change type (and new change type in the history) inside Team Explorer. This feature has been available in TFS 2008 but you had to use the TFS Power Tools. The only gotcha for the TFS 2010 implementation is that you have to use the command-line application tf.exe to actually perform the rollback operation. More information about the tool is available here in the MSDN Library:

The syntax is:

tf rollback /changeset:changesetfrom~changesetto [itemspec] [/recursive]
[/lock:none|checkin|checkout] [/version:versionspec]
[/keepmergehistory] [/noprompt] [/login:username,[password]]

tf rollback /toversion:versionspec itemspec [/recursive]
[/lock:none|checkin|checkout] [/version:versionspec]
[/keepmergehistory] [/noprompt] [/login:username,[password]]

Date/Time D"any .Net Framework-supported format"
or any of the date formats of the local machine
Changeset number Cnnnnnn
Label Llabelname
Latest version T
Workspace Wworkspacename;workspaceowner



Rollback Available in the UI Now

If you have the August 2011 or later version of the TFS 2010 Power Tools installed, you now have the ability to fire off a rollback straight from Team Explorer without having to use the command-line approach.  The main way would be to fire it off from the Source Control Explorer window.


However, you can start the rollback process from the Changeset History window as well.



Ed Blankenship

Thursday, 13 May 2010 03:01:19 (Pacific Daylight Time, UTC-07:00)
A helpful article, thanks.

It is a real shame though that we can't just rollback from the GUI instead fo having to fiddle about with the command line. That would make the use experience so much better.
M Nield
Friday, 19 August 2011 08:44:05 (Pacific Daylight Time, UTC-07:00)
I agree - now we have the ability to perform rollback in the UI using the latest release of the TFS 2010 Power Tools.
Friday, 23 March 2012 10:02:38 (Pacific Standard Time, UTC-08:00)
Thanks! Why can't Microsoft write usable help?
Tuesday, 03 April 2012 13:27:09 (Pacific Daylight Time, UTC-07:00)
how do you get to the changeset history window?
Don't assume everybody knows everything you do
Friday, 04 May 2012 14:49:23 (Pacific Daylight Time, UTC-07:00)
Huge nailed it.. how do you get to that screen?
Confused User
Monday, 16 July 2012 08:52:16 (Pacific Daylight Time, UTC-07:00)

I know you asked the question awhile ago, but don't assume a response from the guy if you can't ask without being snarly about it...

That being said, to get the "changeset history window", choose/highlight a branch/directory (a branch would make more sense in this case since you'd want to see all the changesets included in the entire branch), right-mouse click, choose "View History". Once you do so, you can highlight a changeset in the changeset history window, right-mouse click the changeset and then choose "Rollback Entire Changeset" if you so wish...

Have a nice day...
Monday, 04 March 2013 07:15:44 (Pacific Standard Time, UTC-08:00)
Ed- you're awesome. Nice, concise, etc. If you ever tire of what you're doing- and especially if you know a whole team of folks who can explain things as you do- you'll take the documentation world by storm. (Guess you already ARE- it's just that the doc world is "Google" now, instead of on paper.)

Again, NICE JOB, and thanks- huge time saver.
Jim Peak
Monday, 16 March 2015 08:12:44 (Pacific Standard Time, UTC-08:00)
Thanks Ed Blankenship,

This helped me get things moving quickly.
Tuesday, 03 January 2017 08:51:21 (Pacific Standard Time, UTC-08:00)
What's the difference between:

Rollback changes from a single changeset:
Rollback to a specific version


(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

[Captcha]Enter the code shown (prevents robots):

Live Comment Preview