Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I undo a changeset rollback in TFS 2010?

I accidentally rolled back an entire changeset. How can I undo that operation, and restore the changeset?

like image 766
Eccentropy Avatar asked Sep 01 '11 19:09

Eccentropy


People also ask

How do I undo a changeset?

To roll back a changeset from the History windowIn the History window, select two or more consecutive versions, open their shortcut menu, and choose Rollback.

What is rollback entire changeset in TFS?

Rollback entire changeset will give you a set of Pending Changes that when checked in will "undo" what was done in changeset 601. The result is that you will have 3 changesets: 600, 601, 602. And the resulting state will be the same as after 600.

How do I rollback a changeset in TFS 2010?

Rollback reference (TFS 2010)right click file in Visual Studio and Source Control/View History then select last changeset, right click and click Rollback After rollback done, you should check in again.


2 Answers

If you select "Rollback Entire Changeset" in TFS, it changes the local files so that the changes made in the changeset are reversed.

Since this is a local change and does not take effect until you check the changes in, you can "undo" the rollback by using "Undo pending changes" on your project. Note this will also mean any other uncommitted changes would also be lost, so use with care.

like image 161
Quango Avatar answered Sep 27 '22 23:09

Quango


You can always "View History" and retrieve a particular Changeset...

like image 27
Abhinav Bhatnagar Avatar answered Sep 28 '22 00:09

Abhinav Bhatnagar