hexo迁徙以及新建git仓库
hexo迁徙
- 设置git
- git config —global user.name username
 - git config —global user.email email@qq.com
 - ssh-keygen -t rsa -C email@qq.com
 - eval $(ssh-agent -s)
 - ssh-add C:/Users/herrwu/.ssh/id_rsa
 - clip < C:/Users/herrwu/.ssh/id_rsa.pub
 - 添加ssh密钥在github的setting里面
 - ssh -T git@github.com
 
 建立git仓库
- git init
 - git add .
 - git commit -m “first commit”
 - git branch -M master
 - git remote add origin https://github.com/mushroomfire/MyBlog.git
 - git push -u origin master
 - 默认不更新某些文件
 - git rm —cached . 去除追踪记忆
 - 在.gitignore文件中添加需要忽略的文件或者文件夹
 - 同步远程和本地仓库
 - git remote -v
 - git fetch origin master
 - git log master.. origin/master
 - git merge origin/master # 合并
 
安装git, npm, node
安装hexo
- 保留文件如下:
- _config.yml
 - package.json
 - scaffolds/
 - source/
 - themes/
 
 - npm install -g hexo
 - npm install —force
 - npm install hexo-deployer-git -save
 - rm -rf .deploy_git
 
- 保留文件如下:
 生成文章并提交
- hexo n file
 - hexo cl
 - hexo g
 - hexo s 查看
 - hexo d 上传
 
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 HerrWu's Blog!
 评论


