Reputation: 59213
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?
Upvotes: 11
Views: 9158
Reputation: 486
You can't really rollback a changeset. What you have to do is:
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!
Upvotes: 6
Reputation: 32179
You can accomplish this from the Visual Studio Command Prompt and you don't even need to have a local copy of the code:
# create a temporary folder
mkdir some-workspace && cd some-workspace
# create a temporary workspace
tf workspace /new /collection:http://tfs-host:8080/tfs/some-collection some-workspace
# negate a specific changeset
tf rollback /changeset:some-changeset
# check in the rollback
tf checkin
# delete the temporary workspace
tf workspace /delete some-workspace
# delete the temporary folder
cd .. && rd some-workspace
Upvotes: 0
Reputation: 11
You can do this easily in VS2010 via a nice interface, in a similar way you'd do it with Tortoise SVN, as long as you are also using TFS 2010 on the back-end (make sure this is the case before you try the following, otherwise it won't work):
Get the Team Foundation Server Power Tools December 2011
(You may need to restart your computer after the install)
Then in VS2010 go to View > Other Windows > Source Control Explorer
right-click the project from the Source Control Explorer window and select 'Rollback' - this gives you the rollback dialogue shown in this article (read this from the section titled 'Rollback Available in the UI Now', it gives you all the remaining detail to get you in the right direction). The interface is a little clumsy, but should do the job.
Upvotes: 1
Reputation: 2154
Right click on your code in Team Explorer and click on view history then select your files one by one and right click on files choose get specific version and then a model window would open. Change type combobox value latest version to changeset number and revert the latest code to previous changeset.
Hope this helps....
Upvotes: 0