Github-octopress博客切换电脑怎么办

在使用github-octopress搭建博客后,如遇到换电脑的情况改怎么办呢?

一、保证之前每次本地内容都提交到了github(source目录)

二、切换之后

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
git clone git@github.com:username/username.github.io.git

cd username.github.io

git checkout source

mkdir _deploy

cd _deploy

git init

git remote add origin git@github.com:username/

username.github.io.git

git pull origin master

cd ..

三、换回原来电脑时候

1
2
3
4
5
6
7
//先更新source
git pull origin source

//更新master
cd _deploy
git pull origin master
cd ..

评论

Copyright © 2022 pangff 京ICP备14050056号-1 Design credit: Shashank Mehta