1
我試圖將存儲庫推送到Github上,但我不能像「檢測到大文件」那樣。最大的文件只有38 MB!應該沒有問題。Git錯誤:檢測到大文件,即使沒有大文件存在
但是,錯誤指出文件datafiles/FILENAME.json
是2016.04 MB,並且仍在此子目錄中。但我刪除了這個!我也使用git commit
,所以這些變化應該承諾。
我進入子目錄(已使用git init
初始化)。然後我嘗試使用sudo git push origin master
。
這是$ sudo git push origin master
後,我得到的錯誤:
Counting objects: 19, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (18/18), done.
Writing objects: 100% (19/19), 1.69 GiB | 385.00 KiB/s, done.
Total 19 (delta 9), reused 0 (delta 0)
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: b2274b496089a760fae877fdaf3d8b23
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File datafiles/FILENAME.json is 2016.04 MB; this exceeds GitHub's file size limit of 100.00 MB
問題是什麼?
注:我不認爲你需要使用'sudo'。 – Nayuki
該文件可能仍在您的git歷史記錄中。你有沒有實施它,然後嘗試推它,然後創建第二次提交將其刪除?請參閱[如果是這樣的github教程](https://help.github.com/articles/removing-files-from-a-repository-s-history/)。 – Pokechu22
我認爲BFG是要走的路!未來的讀者,請到這裏https://rtyley.github.io/bfg-repo-cleaner/ – ShanZhengYang