我在旧的提交中添加了一个文件,并且没有推送该提交,然后我从目录中删除了该文件。之后,我做了更多更改并添加了更多提交,现在每次我尝试推送代码时都会遇到此错误git push -u origin master
Counting objects: 58, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (58/58), done.
Writing objects: 100% (58/58), 197.83 MiB | 370.46 MiB/s, done.
Total 58 (delta 44), reused 0 (delta 0)
remote: Resolving deltas: 100% (44/44), completed with 10 local objects.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 7db8d77e8595ae0da9cc34aa2ab1c4d0
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File public/uploads.zip is 197.85 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/repo-name
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/repo-name'
提到的文件uploads.zip
之前已经手动删除了。所以该文件不存在于目录中。
当我做git log origin/master..master
我什至没有在列表中看到该文件。
这是结果git status
link
如果您的 git 存储库不断尝试上传大文件,您可能需要检查是否有任何跟踪的(以及后来删除的)大文件。
Use BFG 回购清理器并查看您的历史记录中是否没有要删除的文件。
删除所有大于 10 MB 的 blob:
$ bfg --strip-blobs-bigger-than 10M my-repo.git
# or
java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)