Reputation: 533
I need to hand off a visual studio project that has multiple branches. Bitbucket is being used as the repo. I am trying to find a way to download the entire repo with every branch. I'm not sure if there is a solution using GIT or some feature in bitbucket that I can't find. When I try to download directly from Bitbucket I only get the master branch
Upvotes: 0
Views: 4620
Reputation: 533
I needed to download all branches so I could send them to a client via FTP who I couldn't give repository access to. The following worked:
git archive --format zip --output ~/pathToWhereYouWantToSave HEAD
Upvotes: 0
Reputation: 522817
Is there some reason why you can't just git fetch
from the repository:
git fetch origin
This should pull in every remote branch to whatever local machine from which you issue this command. If you need to access a particular branch, you could just check it out via:
git checkout some_branch
Upvotes: 1
Reputation: 427
Open Team Explorer => Open your repository => Select 'Branches' tab => Right click your repository => click 'Create local branch from' => choose source branch from dropdown with name /origin/branchname
Upvotes: 0