hexo源码入库
接入hexo目录构建本地的git库
git init
添加要纳入版本管理的文件
:::warning
【 注意 】 themes 下面git clone 下来的版本把对应的.git目录干掉
:::
git add _config.yml
git add hexo-theme-next/
git add package-lock.json
git add package.json
git add scaffolds/
git add source/
git add themes/
提交修改到本地库
git commit -m "add hexo source code"
构建远端目标库链接
git remote add origin https://gitee.com/shencp/hexo.git
本地版本库推送到远端
git push -f origin master
:::info 通过-f可以直接将之前提交的代码覆盖,将本次提交的代码库作为初始代码库版本 :::
源码使用
clone代码
git clone https://gitee.com/shencp/hexo.git
重新部署hexo
npm install hexo // 安装hexo 安装完成hexo 不需要初始化hexo,否者hexo 配置参数会重置
参考文档
https://blog.csdn.net/qq_25458977/article/details/87875641
https://www.jianshu.com/p/55f11d8973f0