Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shelving Pending Changes in TFS

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.

like image 576
Aaron Avatar asked Apr 14 '09 15:04

Aaron


People also ask

What does shelve pending changes mean in TFS?

Shelving is temporarily storing pending changes you have not committed yet. This is useful, for example, if you need to switch to another task, and you want to set your changes aside to work on them later. With JetBrains Rider, you can shelve both separate files and entire changelists.

How do I see pending changes in TFS?

Select that folder in TFS explorer and right click. you will see the option "Checkin Pending changes.." Show activity on this post. In the team explorer open up the source control tab, then right click on the route folder and select Check in Pending Changes.

How do I get TFS shelved code?

If you click on the branch/folder in Source Control Explorer, right click, go to Find, then click Find Shelvesets as you do to see them, and then when you find the shelveset you want to look at, right click on it in your team explorer window and choose "Unshelve".

What is code shelving?

Shelving is a feature that is available through the use of Team Foundation Server (TFS) from Microsoft, a tool for source code management. This feature allows us to create what is known as a “shelveset,” which will essentially hold our local changes in the repository without committing them to the shared codebase.


1 Answers

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).

like image 162
Chris Shaffer Avatar answered Sep 22 '22 09:09

Chris Shaffer