Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Branching in TFS 2010 and being forced to re-download the code

When i create a branch from the mainline in TFS 2010 i have to download all of the code i have just branched.

I already have the latest mainline version on my laptop so why is TFS requiring me to effectively download whats already on my hard disk?

Even if i copy the mainline files into a folder and map the new branch to this folder it still performs a fully recursive get and chokes our bandwith for 30 minutes or so.

This seems like such a waste of time and bandwith - is their a workaround/procedure that i am not aware of?

like image 484
Baldy Avatar asked Sep 24 '10 10:09

Baldy


1 Answers

For faster switching between branches, give the tf get /remap option a try. From Brian Harry's blog:

This is a new option on tf get that is intended to be used when you want to switch your workspace from one branch to another in the same code base. You first change the workspace mapping and then issue a tf get /remap. Because a large percentage of the files in two related branches are frequently identical, this command optimizes for that. Rather than downloading all the content, it will only download the things that are different between the two branches. I can reduce the get of a very large workspace from 10's of minutes to a few seconds.

Note that this requires TFS 2008 SP1 or later.

  • http://msdn.microsoft.com/en-us/library/fx7sdeyf(VS.90).aspx
like image 111
Jim Lamb Avatar answered Oct 01 '22 23:10

Jim Lamb