TFS - create a branch from a local working copy

I am trying to create a branch from my local workspace of the uploaded project.

The main background: I checked from the "trunk" of the project and made a lot of changes.
Now I want to check these changes on a new branch.

I created a new branch from Source Control, but my workspace still maps to the trunk.

I followed the steps from the article I found here: Branch from local workspace

So, I postponed my changes.
Created a branch.
Used by TFPT to transition from trunk to branch

tfpt unshelve "My uncomplete changes" /source:"$/MyRoot/MyProject-Trunk" /target:"$/MyRoot/MyProject-Branch" 

Everything looked smooth (except that it does not support files that were renamed, so I had to skip them)

But nothing has changed.
The branch is an exact duplicate of the trunk (local changes are not included in it)
My workspace is still displayed on my torso.
If I check in, he checks the baggage.

I tried to undo the extracted version, I have, delete the local files, and then check the branch, and then delete the changes that I made, but uploaded

 No appropriate mapping exists for $/Root/MyProject/Myfile.cs 

It seems so simple, but TFS seems to add an extra layer of complexity to what was such an easy task in SVN ...
Hope something stupid I'm doing wrong.

Any help was appreciated.

+7
source share
1 answer

Try the following:

  • You need to include a new branch in the workspace to see any changes (otherwise you will see only verified versions). From Source Control Explorer select Workspace->Workspaces... on the toolbar.
  • Select Edit for your workspace and add the mapping to a new branch, for example. Active|$/Root/MyProject-Branch|<My Local TFS Storage>\MyProject-Branch
  • Run the tfpt unshelve <shelveset> /migrate /source:$/Root/MyProject /target:$/Root/MyProject-Branch . He should create a new cabinet with the display changed to a new branch.
  • Try installing a new, migrated shelf on a new branch.

Btw, in TFS, the term should map the project / branch to local storage, and not "check", as in SVN. This term is used for those files that you make changes;).

+5
source

All Articles