簡單記錄小弟係學校lab同屋企兩部電腦點樣同步更新.
例如, 你係學校/公司的A電腦開始起website, 完成咗上兩個tut的步驟, 而家係屋企B電腦想做更新, 第一步係起番相應既develop environment.
inital on the second computer.
On any directory.
1 | npm install hexo |
Clone your website file.
1 | git clone https://github.com/[youraccount/yourrepository] |
On your repository directory install the Node.js package manager.
1 | npm install |
Install the deployer.
1 | npm install hexo-deployer-git |
confirm your environnment.
1 | hexo g |
edit something and deploy it to github. Remember to generate your SSH key to github account.
1 | hexo d |
B電腦可以更新個website喇~ 之後記得backup d file番github.
backup to github after edit.
Backup 3 step!
1 | git add . |
A, B電腦都有website file同environment. A電腦要更新要點做呢?
Back to the original computer, how to update.
Replace your local document with github backup.
1 | git fetch origin |
After edit remember to backup your data to github!