Mr. Boy
Mr. Boy

Reputation: 63816

When shelving changes to a branch in TFS, does the shelf-set belong to the branch?

I'm working on a feature branch in TFS, and have ended up working on some experimental stuff that shouldn't be pushed to the master branch. However the rest of the work in this branch (already committed) does need to be merged back to master. I was thinking I could shelve these pending changes, but I'm worried the branch could get deleted and my shelved changes lost.

Is this correct, and if so what is the best route to go here?

Upvotes: 3

Views: 653

Answers (1)

Dylan Smith
Dylan Smith

Reputation: 22255

Shelvesets do not belong to a branch (for example it's possible for a shelveset to contain changes to many branches in one shelveset).

However, your changes will not be lost. Typically things are deleted in TFS (not destroyed) so the files, and changes are still available for viewing in TFS.

It is also possible to unshelve a shelveset into a different branch using the TFS Power Tools with the command:

tfpt unshelve /migrate

This will rewrite server paths as described in this blog post: http://geekswithblogs.net/TarunArora/archive/2011/06/06/unshelve-shelveset-created-from-one-branch-to-another.aspx

Upvotes: 3

Related Questions