Search code examples
visual-studiotfsshelve

TFS undo to last shelve


What I want to do: I made some changes in code and I want to make some kind of "checkpoint" (like git commit), then continue working and being able to simply undo changes to last "checkpoint". I don't want to use Check In.

If I'm not mistaken, it could be done by Shelving, but I'm unfortunately not sure how exactly I can achieve that.

Thank you.


Solution

  • In the "Pending Changes" tool window in Visual Studio just select "Shelve" at the top, enter a name and click the "Shelve" button:

    enter image description here

    To go back to your "Checkpoint", restore your Shelveset via Actions => Find Shelveset => Rightclick => Unshelve