Frage

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.

War es hilfreich?

Lösung 2

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.

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top