Yu-Chieh’s Blog (Y.C. Chang)

Ruby on Rails / Rubygems / FullStack / Git / Mac notes.

Set Up Octopress on 2nd Mac for the Same Blog

在另外一台Mac上安裝octopress編輯環境, 可對應編輯同一個github的blog

  1. copy prikey from your master mac to your 2nd mac device and put it under ~/.ssh folder
  2. clone your repository to second device
1
$ git clone https://github.com/xxx/xxx.github.io.git
  1. setup your 2nd mac device
1
2
3
4
5
6
7
$ cd xxx
$ bundle install #install required gems
$ ssh -T git@github.com # for testing connection to github
$ rake setup_github_pages # this is important for create _deploy folder in 2nd mac device
$ rake new_post["xxxx"] 
$ rake generate
$ rake deploy # it's done while no error message here.
  1. git between two mac device
1
2
3
4
$ git pull origin source  # git pull before push every time!
$ git add .
$ git commit -m 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quisquam'
$ git push origin source

Done.

Comments