1. 问题描述
当使用hexo clean && hexo d
部署时,出现下面的错误:
remote: Powered by GITEE.COM [GNK-5.0]
remote: error: File: 251f4b6a8eb247f2fe5be01ba30b58c7bd5e64be 194.62 MB, exceeds 100.00 MB.
remote: Use command below to see the filename:
remote: git rev-list --objects --all | grep 251f4b6a8eb247f2fe5be01ba30b58c7bd5e64be
remote: Please remove the file from history and try again. (https://gitee.com/help/articles/4232)
To git@gitee.com:yezhechenyang/myblog.git
! [remote rejected] HEAD -> master (pre-receive hook declined)
error: failed to push some refs to 'git@gitee.com:yezhechenyang/myblog.git'
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
at ChildProcess. (D:\CodeTest\HexoTest\myblog\hexo-blog-fly\node_modules\hexo-util\lib\spawn.js:52:19)
at ChildProcess.emit (events.js:310:20)
at ChildProcess.cp.emit (D:\CodeTest\HexoTest\myblog\hexo-blog-fly\node_modules\cross-spawn\lib\enoent.js:40:29)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
有一个视频文件超过了100M,导致push
到Gitee
上报错。
2. 解决过程
尝试删除视频文件重新部署。
删除文件后,再次运行hexo clean && hexo d
,还是会报上面的错误。
这该如何解决呢?
第二次部署的时候,很明显发现还会上传视频。说明hexo
并没有在Git
的本地管理中把视频清除掉。
那么需要我们自己去清理Git
本地版本管理的视频缓存了。
直接删除.deploy_git
目录。
再次运行hexo clean && hexo d
,一切正常,搞定收工!