hexo deploy问题

Hexo deploy的问题

一开始deploy成功之后,再重新deploy的时候,会发现并没有推送本地的文件到GitHub

1
2
3
4
5
6
7
8
9
10
11
12
13
INFO  Deploying: git
INFO Clearing .deploy_git folder...
INFO Copying files from public folder...
INFO Copying files from extend dirs...
On branch master
nothing to commit, working tree clean
To github.com:OliverLPH/OliverLPH.github.io
+ a8ea0df...bc3e952 HEAD -> master (forced update)
Branch 'master' set up to track remote branch 'master' from 'git@github.com:OliverLPH/OliverLPH.github.io'.
INFO Deploy done: git
xiaohuobandeMBP:source Oliver$ hexo clean
INFO Deleted database.
INFO Deleted public folder.

然后如上面的代码所示,hexo显示nothing to commit, working tree clean。

在网上搜索后发现有的几种方案

方案一

1
2
hexo clean
hexo d

这样就可以清理掉public文件夹,然后重新deploy

方案二

移除.deploy文件夹

1
2
3
rm -rf .deploy
hexo generater
hexo deploy