Clone is not getting all my branches from GitHub

I followed the instructions here to create a GitHub Pages-hosted blog using Octopress.

After the first deployment, two branches got created on GitHub: source and master.

Then I ran git branch and I noticed I only have one of the two branches locally. I ran git pull, expecting Git to download my other branch as well, but it instead merged the two branches.

I deleted my local repo and then did a git clone, expecting to get the two branches locally, but I Git only downloaded the master branch of my Weblog.

Any ideas what have I done wrong and how can I get my two branches locally?

Update 1

Thanks for the answers. Just for sake of completeness, here’s what I ended up doing:

git clone <github URL> -b source myblog
cd myblog
git clone <github URL> -b master _deploy

And then it was possible to continue with writing new posts, and deploying via rake deploy.

  • Git workflow with Octopress on Heroku
  • Rake aborted when running “rake install” for Octopress?
  • fatal: could not open '.git/COMMIT_EDITMSG': Permission denied
  • how do I check in something that is a submodule?
  • Rake w/Git says 'fatal: Will not add file alias' but I can do it manually?
  • Failed to deploy to Github Pages using octopress
  • How can I keep my blog git repository clean?
  • Octopress blog deploying error 'rake aborted! No such file or directory - git remote -v'
  • 2 Solutions collect form web for “Clone is not getting all my branches from GitHub”

    Seems like nothing is wrong, actually. Your source branch should contain Octopress, so once you did git checkout source, you should be able to create your posts and then use corresponding rake tasks in order to generate static files, stage/commit/push them to the master branch on origin, which will make your posts accessible on Github Pages.

    There is a big difference between local branches and remote branches. A git clone will fetch all information from the origin/remote. And will checkout (create the local branch, which tracks its corresponding remote branch, and checks out the working files) the default branch of the repository. Technically you should have master, origin/master, and origin/source branches in your cloned branch..but git branch only shows your local branch(es): master. Run git branch -a to show all branches (local and remote). Run a git checkout source, which will create a local branch based off of the remote branch.

    Git Baby is a git and github fan, let's start git clone.