大文件卡在git缓存中

时间:2018-06-25 20:01:06

标签: git

我有一个本地git仓库,我想与一个远程仓库进行同步。当我跑步时:

$ git push -u origin master

我收到一个错误:

fatal: HttpRequestException encountered.
   An error occurred while sending the request.
Username for 'https://github.com': user
Counting objects: 232, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (117/117), done.
Writing objects: 100% (232/232), 248.51 MiB | 199.43 MiB/s, done.
Total 232 (delta 109), reused 232 (delta 109)
remote: Resolving deltas: 100% (109/109), done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: c4ab687be82765a35d7a998795dc1b4c
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File language-model/augmented_train_text.json is 736.14 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/domain/speech-2-text-research.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/domain/speech-2-text-research.git'

我已经尝试过:

git rm -r --cached .
git add .
git commit -m ".gitignore is now working"

当我通过git ls-files查看文件时,可以验证没有任何被忽略的文件出现在其中。

但这仍然对我不起作用。当我再次尝试推送存储库时,即使它不再出现在历史记录或暂存区域中,我仍然会遇到大文件错误。

$ git rm --cached language_model/augmented_train_text.json
fatal: pathspec 'language_model/augmented_train_text.json' did not match any files

我也尝试了一些垃圾回收,但问题仍然存在。

还有其他方法可以解决我应注意的损坏的.gitignore吗?

0 个答案:

没有答案