1

I read here this text:

If you want to get a copy of an existing Git repository – for example, a project you’d like to contribute to – the command you need is git clone.

I need to get complete repository (with all branches).

But when I use the command git clone <address> <output_directory_name> then I get clone with one branch only. I see it through the git branch command. If I use the git clone <address> -b <branch_name> <output_directory_name> then I get only that branch (I see it through the git branch command again).

How can I get full content of a git repository with all branches? The repositories which I cloned are located on Bitbucket website.

0

1 Answer 1

1

A regular git clone ... followed by a git fetch --all will do the trick.

2
  • 1
    I did git fetch --all after cloning, but I see one branch still. Dec 25, 2016 at 14:59
  • Try git branch --list.
    – negacao
    Dec 25, 2016 at 15:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.