git clone <bitbucket sever url>/<repo name>.git
Gets us the repo with just the master branch in it. If we try to switch to another branch, have to grab it from server individually to be a local copy of the branch.
Doing git clone <Repo> from a standalone GIT server gets all the branches to be a local copy.
Is there a setting somewhere in Bitbucket that would enable the "get all the branches" behavior, or some flag that can be passed to it to do so?
Using Bitbucket 5.6.1 if it matters (our IT is working to get us to latest but... slow).
What you see is expected Git behavior, when you clone a repository it will create a local copy of the master branch. If you do a git branch -a you will see that you have access to all remote branches.
As @Edwin Kyalangalilwa mentioned you can use git checkout branch, this will create a detached HEAD state, since you are checking out a remote branch. If you use git checkout -t origin/branch it will setup a local copy and track it to the remote.
Thank you Mikael, upon further playing around with GIT we realized we had a fundamental misunderstanding of what clone was supposed to do.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, i understand that, but that gives me that one branch only.
The purpose of checking out everything is because a developer on a project will be going on travel and needs to have multiple branches available so they can keep working while they are away from the Bitbucket server which is physically not connected to the Internet.
Are you saying the only way to get all branches to checkout locally is to check them out one by one?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.