Add More Computers to Blog From With Octopress and Heroku

| Comments

Here is how to add more computers to blog from with Heroku and Octopress.

On computer 2 (assumes Rails and all dependencies are installed):

First clone your Octopress site. Then cd into the clone, generate, commit and push.

clone your blog from heroku
1
2
3
4
5
6
git clone git@heroku.com:lazy-turtle-2778.git
cd lazy-turtle-2778
rake generate
git add .
git commit -m 'testing from 2nd computer'
git push origin master

Now you can manage your Octopress blog from computer 2.

The next day you want to add a post from computer 1. On computer 1, check the name of the remote repository:

check name of remote repository
1
2
3
jacqueline@oude-laptop:~/Desktop/code/octopress$ git remote -v
heroku    git@heroku.com:lazy-turtle-2778.git (fetch)
heroku    git@heroku.com:lazy-turtle-2778.git (push)

Now you need to fetch the files from the heroku repo and merge them.

fetch and merge
1
2
jacqueline@oude-laptop:~/Desktop/code/octopress$ git fetch heroku
jacqueline@oude-laptop:~/Desktop/code/octopress$ git merge heroku/master

And all is set to manage your blog from computer 1.

Comments