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

Craig Celeste picture Craig Celeste · Jan 2, 2015 · Viewed 7.1k times · Source

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.

Answer

Dylan Smith picture Dylan Smith · Jan 2, 2015

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.