Showing posts with label shelveset. Show all posts
Showing posts with label shelveset. Show all posts

Wednesday, May 14, 2014

TFS switch working copy to another branch

Problem

I assume that you already have a working copy of $/branch1.
Let's say it's checked out to local folder c:\inetpub.
And you want to remap this working copy to $/branch2 without re-downloading everything again.

Solution

  1. First you'll need to unmap existing branch.
  2. Map working copy folder to new branch.
  3. Apply remap recursively.

Run the following commands from command line:

tf workfold /unmap $/branch1
tf workfold /map $/branch2 c:\inetpub
tf get c:\inetpub /remap /version:T /recursive


You'll probably want to unshelve a shelveset from another TFS branch afterwards.


Tuesday, February 18, 2014

How to change default code editor for shelveset details in TFS

You need to change the following key in windows registry:
1. open REGEDIT
2. Find the key HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\text\shell\edit\command
3. Change the path to the editor (%ProgramFiles(x86)%\Notepad++\notepad++.exe  in my case)