git clone again
1 | 1. install node |
第一步: 在A电脑上部署了一切
第二步: 在B电脑上建立了同步环境
- 在hexoblog目录下git init
- 新建hexoblog.github.io目录, 以下操作在该目录下进行.
- git init
- git remote add origin https://github.com/xyzio/xyzio.github.io.git
- git fetch –all
- git reset –hard origin/hexo
- 拷贝node_modules, public, themes/next到相应的目录
- 运行myhexo.sh大招
ps: 在B电脑上, git clone, npm install, 编辑修改, git add . , git commit -m “update”, git push -u origin blogsource. —20180318
以下才是日常 下班前在B电脑运行zhexo cgd gitamp.sh大招, 回到家在A电脑运行git pull. 依此循环.
hexo 多终端同步博客: 这篇博文应该也是对的. ____________________
A电脑上把一切都弄好, 包括node等环境, hexo安装配置, github的本地及远程仓库.
B电脑上先建立node等环境, hexo安装好. 然后再建立本地github的仓库, 与远程搭上关系, 再clone下来.
B电脑上如果有改动, 则myhexo.sh, 将github与B同步, 保证github上的是最新的.
回到A电脑, 先git pull.