Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between shelve and check in in TFS?

What is the concept of each?

When is it ok to shelve your changes instead of checking in?

like image 980
juan Avatar asked Feb 05 '09 16:02

juan


People also ask

What is shelve in TFS?

Shelving is a way of saving all of the changes on your box without checking in. The changes are persisted on the server. At any later time you or any of your team-mates can "unshelve" them back onto any one of your machines. It's also great for review purposes.

What is shelve and Unshelve in TFS?

Unshelving is how you restore the shelveset to your machine so you can keep working on it. It doesn't change the shelveset on the server (to do that you need to shelve things again and use the same shelveset name).

What does shelve pending changes do?

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.


2 Answers

Shelved means the changes are set aside for you to work on later.

Checked in means that the changes are made available to the rest of the team, will be in the build and will eventually ship.

Very different. Think of shelving as a tool for context switching when you're not done with a task. Checking in means you're done (at least a part of it).

like image 124
Darcy Casselman Avatar answered Oct 14 '22 17:10

Darcy Casselman


Shelve your changes when you want to save the changes that you have made, but need to go back to the previous version to make other changes (perhaps, bug fixes) that you want to deploy without the updates you are currently working on. Since you're usually checking in pretty regularly, I find this to be a rare occurence -- like I just deployed to the QA box and an error was immediately found. I'll shelve that day's changes bringing me back to the QA deployed version, make the update, then unshelve my changes -- merging the two as necessary. Any longer than that and you'll probably be looking to check out a previous version and branch instead. I'd be happy to hear of other experiences where shelving has proved more useful, though.

like image 30
tvanfosson Avatar answered Oct 14 '22 18:10

tvanfosson