Cloning of github.com/spbooks/phpmysql6

I am trying to download all the branches from git for: https://github.com/spbooks/phpmysql6
I have done the following clone as instructed in the Appendix A, but this only downloads the MASTER branch. Could someone assist me with this…

$ git clone https://github.com/spbooks/phpmysql6 Project
Cloning into ‘Project’…
remote: Enumerating objects: 3922, done.
remote: Total 3922 (delta 0), reused 0 (delta 0), pack-reused 3922
Receiving objects: 100% (3922/3922), 408.71 KiB | 427.00 KiB/s, done.
Resolving deltas: 100% (1691/1691), done.

As far as i have tested this, all branches are present, but invisible, so you have to explicit list them

git branch -a

from there you can just check them out like

git checkout remotes/origin/Sample-Switcher

Thank you for this.
I have not worked with hidden items in GIT before.
So without actually checking out each of the branches individually to get access to the data, is there a way I can get all the branches extracted in one process?

I only had a search for this

where i found a bash script mentioned

https://gist.github.com/octasimo/66f3cc230725d1cf1421

Thanks again for this, it’s a bit beyond my GIT knowledge but will read up on it.

It seems strange to me that you would like to checkout every branch in that repo. Are you just trying to easily view all the remote branches? If so SourceTree provides an excellent desktop program for managing git which includes viewing all remote branches.

the repo branches every subject/chapter/example into its own branch. If you only pull master you’ll get nothing.

Thank you zee, I shall try Sourcetree. When I want to refer to a file from this archive, I just want to be able to browse to a directory on my drive and open the file.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.