Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 无法推送回购,文件太大_Git_Github - Fatal编程技术网

Git 无法推送回购,文件太大

Git 无法推送回购,文件太大,git,github,Git,Github,我不小心将一个大的.eps文件添加到我的repo中,无法推送到github 我已将包含该文件的目录添加到.gitignore并尝试运行 git rm -rf --cached . 然后推动回购,但它仍然给我 remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. remote: error: Trace: 024db

我不小心将一个大的.eps文件添加到我的repo中,无法推送到github

我已将包含该文件的目录添加到.gitignore并尝试运行

git rm -rf --cached .
然后推动回购,但它仍然给我

remote: error: GH001: Large files detected. You may want to try Git Large File 
Storage - https://git-lfs.github.com.
remote: error: Trace: 024db62abfc6a9ecb4771d5437bb9cdc
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File _assets/ToroAds_ChrisTuck.eps is 903.72 MB; this exceeds GitHub's file size limit of 100.00 MB
这是我的.git文件的内容

/bower_components/
/node_modules/
/_assets/

即使从头部删除该文件,它仍然存在于提交中。您需要更改历史记录以将其从存在的提交中删除。您是否尝试过
git rm--cached file.eps
?这个答案可能会帮助您:@kawnah这样做不会有帮助,因为该文件已经在分支的历史记录中。正如crashmstr所说,它必须从历史中删除。可能是