Our TFS instance recently changed URL and without this change it is required to filter-branch entire repository and change every git-tfs-id line in comments just to make git-tfs stop going to old URL to check. With it one should just keep config section for old branch and change the very last commit's comment (for each TFS branch). Also theoretically should save some time if several TFS instances are used as only specified with -i option is authenticated against.
Compiled for TFS Server 2008, 2010, 2012 and tested with TFS Server 2010, 2012
!! This command need that the clone of the TFS repository was made from the trunk (and not on the whole repository) and with history (not a quick-clone).
Usage for TFS 2010 and 2012 :
-------------------------------
* to clone one branch
git tfs init-branch $/Repository/path <git-branch-name-wished>
ex :
git tfs init-branch $/Repository/ProjectBranch
git tfs init-branch $/Repository/ProjectBranch myNewBranch
* to clone all branches
git tfs init-branch --all
Usage for TFS 2008 :
---------------------
* to clone one branch
git tfs init-branch--parent-branch=$/Repository/ProjectParentBranch $/Repository/path <git-branch-name-wished>
ex :
git tfs init-branch --parent-branch=$/Repository/ProjectParentBranch $/Repository/ProjectBranch
git tfs init-branch --parent-branch=$/Repository/ProjectParentBranch $/Repository/ProjectBranch myNewBranch