Hyeyeon blog

[Git] this exceeds GitHub's file size limit of 100.00 MB 본문

개발/etc

[Git] this exceeds GitHub's file size limit of 100.00 MB

Hyeyeon.P 2019. 3. 4. 12:36
반응형

# git push 에러 발생

remote: error: GH001: Large files detected. 
You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 064235146208ac1c34111e66858bca0a
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File app/heavy.txt is 144.50 MB; this exceeds GitHub's file size limit of 100.00 MB

1. git-lfs 적용

git lfs install
git lfs track "*.exe"
git commit -m "Large file included"

2. BFG Repo-Cleaner 적용

  1. BFG Repo-Cleaner에서 bfg-x.x.x.jar 파일 다운로드 후 프로젝트 폴더(.git과 같은 폴더)에 위치
  2. Repository에서 Commit에 포함된 100MB 이상의 파일을 정리하는 명령어 실행
  3. java -jar bfg-x.x.x.jar --strip-blobs-bigger-than 100M
  4. Warning : no large blobs matching criteria found in packfiles — does the repo need to be packed? 발생 시,
    아래 명령어 실행 후 다시 위 명령어 실행
  5. git repack && git gc
  6. 계속 안되면 해당 파일 삭제 명령어 실행
  7. java -jar bfg-x.x.x.jar --delete-files "heavy.txt" // heavy.txt 는 100MB 이상의 파일


728x90
Comments