2

I just got a mac and I'm having issues with command line git. When I clone a repository, none of the branches are being tracked. Is there a way to clone a repository and also clone the branches locally? I know that I can make a new local branch and track a remote branch, but I don't want to have to do that for every branch in the repository.

$ git branch -a
* master
  remotes/origin/9PMComplete
  remotes/origin/HEAD -> origin/master
  remotes/origin/LinkUpdate
  remotes/origin/Safari
  remotes/origin/TableUpdate
  remotes/origin/Update_1.0.1
  remotes/origin/Update_1.0.2
  remotes/origin/master
  remotes/origin/onclick
Tiocrash
  • 347
  • 5
  • 16

1 Answers1

1

Don't forget that remote tracking branches (the ones in refs/remotes/origin namespace) are not tracked locally on purpose.
See "Tracking Branches and Remote Tracking Branches: Summary".

Only the default branch of the remote repo is tracked locally.

That avoid having too many branches to deal with at the beginning.

If you have to track all branches, see "Track all remote git branches as local branches"

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250