尝试push
时,我收到致命错误,因为git试图包含一个对GitHub来说太大的文件。 git rm file
失败,因为该文件不存在(它已存在,但不再存在)。 Git似乎拒绝承认文件已经消失。
我该怎么办?
有关信息,我得到的错误消息是:
remote: error: GH001: Large files detected.
remote: error: Trace: dbbfb79f51f133c90dfd58730a4ab624
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File [filename] is 385.65 MB; this exceeds GitHub's file size limit of 100 MB
To https://github.com/[---].git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/[---].git'
如果上面的内容似乎无法实现,那么如何在这里点燃所有与git相关的内容并使用我们在备份目录中保留的代码从头开始设置将会很棒。我们真的没有时间搞砸git ......
答案 0 :(得分:0)
即使该文件不再存在,也要运行git rm --cached file
。这样,文件将从索引中删除。
如果您希望从Git历史记录中完全删除该文件,则需要一些git filter-branch
- fu。