I have a TFS git repository which takes a long time to clone. Is there a way to only clone a single branch in Visual Studio?
Asked
Active
Viewed 7,114 times
1 Answers
6
If you are using Git, you should use (in a CMD or PowerShell instance):
git clone -b branch_name --single-branch 'repo_url'
branch_name is the name of your branch, and repo_url is the link of your remote repository.
This will import an specific (single) branch from your remote repo. According to this, you need to know that Visual Studio will just read your .git (and other Git dependencies like .gitignore) registry.
IMPORTANT: This works only with git >=1.7.10 versions.
See a related MSDN doc page here
And a similar question here
KBeDev
- 347
- 4
- 8