I'm a developer and I've made some changes to a solution, which I have saved off to a shelveset. Another developer unshelves my changes and builds the solution on a server. Is there a way for the second developer to check in my shelveset? I know he/she can check in the individual files comprising the shelveset. However, I was thinking of a "checkin" command that took the name of a shelveset as a parameter, or if there was another way to check in those changes as a unit, with the shelveset name.
-
2+1 I also want to know that. I think you can update question like this "Checking In shelvesets without unshelving it" – IsmailS Jul 15 '10 at 06:16
5 Answers
The other developer can open a Visual Studio Command Prompt and use the following command:
tf checkin /shelveset:shelvesetname;shelvesetowner
See Checkin Command on MSDN for more details.

- 8,919
- 1
- 43
- 60
-
I get the error: "Items cannot be specified with the /shelveset option." - what does that mean? – ekkis Aug 09 '14 at 01:06
-
-
This always deletes the shelveset. I don't see any options to the command to preserve it; must it always get deleted?! – Elaskanator Aug 09 '18 at 21:12
I don't think check-in via TFS Command Line directly is a better way, it maybe conflict with the latest code on TFS.
I think the better way to check in shelveset if there are some another changes in you code, but you don't check in it, is create a new WorkSpace in your local computer
Then map the latest code to the new workspace, then unshelve(download) the shelveset, resolve the conflict if necessary, then check in the code

- 2,479
- 2
- 21
- 30
For those having issues with the error:"Items cannot be specified with the /shelveset option.", try putting the user name in parenthesis as follows:
tf checkin /shelveset:shelvesetname;"shelvesetowner"

- 47
- 2
- 10
An easy way to do this is to define a new workspace and have the developer unshelve to that workspace. Then, all of the pending changes for that workspace correspond to the shelfset, and they can check in everything in the workspace.

- 22,857
- 5
- 54
- 63
-
Thanks for the reply. However, it is possible that multiple developers will have shelved changes that need to be unshelved, built and checked in from the server. I figured that if one could check in by shelveset name, then the shelvesets on the server can be built, tested and checked in one at a time. Is this not possible? – cjs Jul 13 '10 at 18:17
-
It sounds like what you're talking about is similar in fashion to the Gated Checkin approach that you have in TFS 2010. In that setup, TFS will take a check-in, put it in a shelfset, then build based on that shelfset. – Robaticus Jul 13 '10 at 19:13
-
I think I misspoke. When I mentioned building the shelveset on a server, I meant that it will be built in Visual Studio, which is installed on a server. That is, by server I did not mean "build agent". I'm looking at doing this in code but no luck yet. – cjs Jul 13 '10 at 19:45
-
So, basically you have a "buildmaster" that will get 1..n shelvesets into a workspace, perform a build, then selectively check in 1..n shelvesets? If you're looking at checking in all the shelvesets, he could do it from a clean workspace, then just check in all pending changes. If you're looking at selectively checking in the changesets, it will get a bit more difficult and you might have to go to either PowerShell or code. – Robaticus Jul 13 '10 at 22:21
The second developer can go to Team Explorer -> Builds and right click on the Build definition you are working with.
- Select “Queue New Build…”
- In the combobox “What do you want to build?”, select “Latest sources with shelveset”.
- If you go to the button “…” you can select any shelveset from anyone.
- Then check the box “Check in changes after successful build”.
A build runs with that shelveset, the shelveset is checked in when the build passes.

- 1,347
- 13
- 15