问题
I was working on main branch and I have done a lot of changes to files. I did not check in those changes. How to create child branch from main, but all local pending changes which are attached to main branch, changes to be attached to newly created child branch.
So basically: How to create child branch with attaching all pending changes of parent branch to child branch?
回答1:
You can shelve your changes, then use the TFS Power Tools to unshelve them into a different branch.
This is a specific feature of the Power Tools (tfpt unshelve /migrate). It will rewrite server paths to migrate the changes into another branch. See this blog post for more info: http://geekswithblogs.net/TarunArora/archive/2011/06/06/unshelve-shelveset-created-from-one-branch-to-another.aspx
来源:https://stackoverflow.com/questions/21828613/how-to-create-branch-on-tfs-with-attaching-pending-changes-to-new-branch