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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With