Reputation: 23875
After I clone from a bare git repository, my imported local repository doesn't have all the branches in it. Following is the architecture.
Here are the steps how this bare repository came into being.
git init --bare new_repo.git
git remote set-url origin /path/new_repo.git
.git push origin '*:*'
and got success.git branch -r
shows all the remote branches correctly.git branch -r
, it lists only the master branch.Why doesn't the cloned repository have all the remote branches and how can I have all those imported?
Upvotes: 1
Views: 1401
Reputation: 8461
git fetch origin
or whatever your remote is set up to.
And then git checkout BRANCH_NAME
Upvotes: 3