同步hexo项目文件夹至github,但主题无法上传的解决办法

回到主题。

无法提交的根本原因

clone下来的主题也是一个Repository。

解决办法

一、破坏Repository(果断放弃)

从[其他博客](https://www.cnblogs.com/reboot777/p/11164193.html)复制的解决方法:
1.剪切 themes/主题/的.git文件夹到其它处

2.从暂存区删除该文件夹

git rm --cache themes/next

3.使用git status查看状态

4.三步走: -->git add .  -->git commit -m “” -->git push

5.再移回themes/next/.git文件夹

二、将主题Repository单独上传

1.新建github项目
2.将 主题文件夹/.git/config文件中的url改为你新建的git地址

(您还可以在归档页搜索文章标题)