33

Right now I have some major code changes that won't be done in time for an upcoming release and need to be shelved. Is there a good way to get these changes out of my workspace but be able to return to them later? Maybe I am missing something, but looks like the changes remain in the workspace even when they are shelved.

Is there a better way to do this? I'd prefer not to create another workspace.

We're using VS 2008 and TFS 2008.

CJBS
  • 15,147
  • 6
  • 86
  • 135
Aaron
  • 2,427
  • 4
  • 30
  • 41

1 Answers1

54

When you shelve the changes, there is a checkbox towards the bottom "Preserve pending changes locally". Uncheck that and it will undo the checkouts on the files as it builds the Shelf.

Also, once a shelf is created you can safely undo the checkouts yourself; Same result but I consider the checkbox a little safer in that it only undoes the checkout on files that you are shelving (so you won't accidentally undo the checkout of a file that you missed or intentionally didn't shelve).

Chris Shaffer
  • 32,199
  • 5
  • 49
  • 61
  • Does this method pass the shelveset on to TFS for me to retrieve later? – Aaron Apr 14 '09 at 15:51
  • Shelves are stored on the TFS server, so anything that creates a shelf should be retrievable later; You can always check your current Shelvesets before undoing your checkout (just hit "Unshelve" for a list of your shelvesets). – Chris Shaffer Apr 14 '09 at 15:55