微信扫一扫打赏支持

Fixing the “GH001: Large files detected. You may want to try Git Large File Storage.”

Fixing the “GH001: Large files detected. You may want to try Git Large File Storage.”

一、总结

一句话总结:

It turned out that GitHub only allows for 100 MB file.

 

 

二、Fixing the “GH001: Large files detected. You may want to try Git Large File Storage.”

转自或参考:https://medium.com/@marcosantonocito/fixing-the-gh001-large-files-detected-you-may-want-to-try-git-large-file-storage-43336b983272

 

I just migrated my repositories from BitBucket to GitHub but, suddenly, I received an interesting error when I tried to push a repo with some large files inside.

remote: error: GH001: Large files detected. You may want to try Git Large File Storage — https://git-lfs.github.com.

remote: error: Trace: b5116d865251981c96d4b32cdf7ef464

remote: error: See http://git.io/iEPt8g for more information.

remote: error: File fixtures/11_user_answer.json is 131.37 MB; this exceeds GitHub’s file size limit of 100.00 MB

It turned out that GitHub only allows for 100 MB file. The problem is that I can’t simply remove the file because it is tracked inside the previous commits so I have to remove this file completely from my repo.

The command that allow you to do it is:

git filter-branch -f --index-filter 
'git rm --cached --ignore-unmatch fixtures/11_user_answer.json'

At which point you can push the file to GitHub.

 

 
posted @ 2020-10-09 14:40  范仁义  阅读(738)  评论(0编辑  收藏  举报