how to setup octopress if you already have one in github?

335 views Asked by At

this is my blog hosted in github.

http://john-qin.github.io/

now, i want to setup octopress on my ubuntu 12.04. I followed the instruction on this page. http://octopress.org/docs/deploying/github/

I got stuck after "rake setup_github_pages". this instruction is for setting up brand new environment for octopress. I already have it in github. how do I pull the existing one? and where should I put them?

1

There are 1 answers

3
shamp00 On BEST ANSWER

Octopress repositories have two branches, source and master. The source branch contains the files that are used to generate the blog and the master contains the blog itself.

When the local folders are initially configured according to the Octopress Setup Guide, the master branch is stored in a subfolder named _deploy. Since the folder name begins with an underscore, it is ignored when you git push origin source. Instead, the master branch (which contains your blog posts) gets updated when you rake deploy.

To recreate the local directory structure of an existing Octopress blog, follow these instructions.

First you need to clone the source branch to the local octopress folder.

git clone -b source [email protected]:username/username.github.com.git octopress

Then clone the master branch to the _deploy subfolder.

cd octopress
git clone [email protected]:username/username.github.com.git _deploy 

Then run the rake installation to configure everything

gem install bundler
rbenv rehash    # If you use rbenv, rehash to be able to run the bundle command
bundle install
rake setup_github_pages

It will prompt you for your repository URL. Enter the read/write url for your repository (For example, '[email protected]:your_username/your_username.github.com)

You now have a new local copy of your Octopress blog. Check out this post for more information.