I am switching from SVN to Bitbucket, in SVN I have HTTP URL of the branch and I could check out just that branch.
I see that in case of Bitbucket things are bit different, by cloning the repo git clone <<<repo_url>>>
I can check out the master branch of that repo and then later switch to any of another branch in that repo using git checkout <<branch name>>
.
But I do not want this redundant step of cloning the repo and checking out master, I directly want to check out the non-master branch I need from that repo.
But so far I cannot find any solution, and I cannot clone that branch because the clone URL which I get from the Bitbucket is of the repo.
Do anyone knows how to check out the remote non-master Bitbucket branch without checking out the master?
It is not duplicate of this because as per answer of the question you have mentioned, in order to execute
git clone <url> --branch <branch> --single-branch [<folder>]
I need to be connected/configured with that repo, which means a pre-cloning. My question is about checking out a non-master branch without checking our / cloning the master,