티스토리 뷰

github에서는 하나의 파일이 100MB 제한이 있습니다.

Bitbucket은 하나의 파일의 용량 제한은 없고 2GB 이상이 안된다고 합니다.

 

그래서 지금 이야기 하려는 github의 문제점 해결에 대해서 이야기 하려고 합니다.

50MB에서는 Warning을 표시하고, 100MB에서는 Error를 발생한다고 합니다.

 

* Warning의 경우

> remote: warning: Large files detected.
> remote: warning: File big_file is 55.00 MB; this is larger than GitHub's recommended maximum file size of 50 MB


* Error의 경우

> remote: warning: Large files detected.
> remote: error: File giant_file is 123.00 MB; this exceeds GitHub's file size limit of 100 MB

 

github 내용'

 

Conditions for large files - GitHub Help

Conditions for large files GitHub will warn you when pushing files larger than 50 MB. You will not be allowed to push files larger than 100 MB. When pushing to GitHub, you'll receive a warning or error message if you either add a new file or update an exis

help.github.com

해결 방법을 알아봅시다.

 

1. git-lfs 적용

 

https://git-lfs.github.com/ 이곳에 접속하여 git extension을 받아줍니다.

압축을 풀고 install.sh를 실행합니다.

레포에 가서 git lfs install 을 하여 줍니다.

git lfs track "*.zip"

git add .

git commit -m "Your Message"

git push

 

2. BFG Repo-Cleaner 사용

 

기존에 100MB 이상의 파일을 Commit 한적이 없다면 1번의 방법으로 해결이 되지만 기존에 이력이 있다면 해결이 안된다고 합니다.

$ java -jar bfg.jar --strip-blobs-bigger-than 100M

이러한 방법으로 100M보다 큰것을 커밋중에서 삭제하여 주는 방법이 있습니다.

 

혹시라도 진행중에 에러가 발생하게 되면 먼저 이렇게 하여 주어야 한다고 하네요.

$ git repack && git gc

그리고 push를 하여 주세요.

 

안되도 힘내세요...

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함