Remote Repo Cloning

hi team,

When we clone the repo using git clone <ssh://> on the local CLI we see only 1 branch i.e master not the other branches like feature, release branches. however the remote repo on github has many branches like feature and release.

how can i download the branches as well while cloning the repo.

I think you need to change your thinking about git a little bit. It’s a distributed system, the repository on your system is considered to be a different repository than the server.

So when you clone, you create your own copy. You also get a copy of the default branch (master in your case). Now, if you run git branch -a, you’ll see that git has info on which other branches exist on the server. You just don’t have a local copy of those branches.

Just run git checkout <branch_name>, where <branch_name> is a branch that exists on the remote host. It’ll create the branch for you.

thanks for the info . it worked for me this time.