Setting Up Existing Octopress Blog on a New Machine

less than 1 minute read

As any good blogging framework allows users to compose and publish posts from any computer, so does the Octopress. However, the process of setting up Octopress on a second machine is a bit more complex.

Firstly, you need to clone source branch from your blog repo:

git clone -b source https://github.com/USERNAME/USERNAME.github.io DOMAIN.com

Then you need to create _deploy folder:

cd DOMAIN.com
mkdir _deploy

and initialize git with a remote pointing to master branch of your blog repo:

cd _deploy
git init
git remote add -t master -f origin https://github.com/USERNAME/USERNAME.github.io

NB Make sure you pull all changes from master branch,

git pull origin master

otherwise you will end up with this error:

! [rejected]        master -> master (non-fast-forward)

Finally, you can install all dependencies:

bundle install

and start blogging.

Things to remember

If you use multiple computers for blogging, please make sure to pull all changes of your Octopress blog source,

cd domain.com
git pull origin source

and your generated blog:

cd _deploy
git pull origin master

References