Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you recover a rolled back change set in TFS?

Tags:

rollback

tfs

In Visual Studio 2013 Update 3, I accidentally checked in a not-compiling, work-in-progress changeset that I intended to shelve in order for a co-worker to take. I rolled back the change set right away. Bad me.

Is there a way to recover that bad/rolled-back changeset as a Pending Changes so that I (or my co-worker) may continue to work on it? I didn't see anything in the UI and had to manually pull out each file and construct the pending changes by hand. It was only 20 minutes of work to code it originally, so not that big a deal (it was my error) but I'm curious if there was a better way.

like image 226
Craig Celeste Avatar asked Jan 02 '15 15:01

Craig Celeste


People also ask

How does TFS rollback work?

View the history of the thing you want to rollback. Select the changeset you want to roll back. Right click on the changset and choose "Rollback". Check that the pending changes are correct (the rollback command will revert the entire changeset not just the file you selected)

How do I find a change set in TFS?

Find a changeset by IDIn Source Control Explorer, press Ctrl + G. The Go to Changeset dialog box appears. Type the number of the changeset and choose OK. If you don't know the number, choose Find.


1 Answers

As was said in the comments, you can "rollback the rollback". I do it all the time. Just find the rollback changeset in history, and roll that back, and it will get you your half-finished changes into your local workspace, so you can continue working on them and check them in when done.

like image 69
Dylan Smith Avatar answered Sep 30 '22 20:09

Dylan Smith