본문 바로가기
형상관리시스템/git 시리즈😺

github에 100mb 이상 파일 업로드 하기!<Large files detected>😍

by @ENFJ 2022. 8. 17.

깃헙에 100mb 넘는 파일을 업로드 하는 도중 게속 

 

remote: error: GH001: Large files detected. You may want to try Git Large File Storage

remote: error: Trace: b247f8bc263dc538b0e

 

에러가 위와 같이 발생했다.

 

심지어 해당 100mb 파일을 지운후 다시 커밋하고 push를 했는데도 오류가 났다.

구글링 해보니 git에서 제대로 인식을 못했다고 하던데,, 이런 경우가 흔한듯 하다. 

 

이런 문제가 흔한 만큼 해결책도 쉽게 찾을 수 있었다.

 

1.  아래 사이트에 접속해서 다운로드를 받는다.

https://git-lfs.github.com/

 

Git Large File Storage

Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.

git-lfs.github.com

 

2. cmd 터미널에 아래 명령어를 차례대로 적어준다.

 

 git lfs install

git lfs track "*.zip"      (이때 100mb 넘는 파일의 확장자를 적어주면 된다. 나는 .war 확장자 파일이 100mb 넘어서                                        git lfs track "*.war" 이라고 적어주었다. )

git add .gitattributes

 

3. 끝~

 


사이트https://git-lfs.github.com/에 들어가보면 누구나 따라할 수 있도록 나와있다! 

lfs 사이트 .jpg

 

 

직접 명령어 치면서 해결중인 jpg

 

git add .gitattributes 명령어를 입력하게 되면 아래와 같은 파일이 하나 생성되는데 보아하니 해당 확장자를 대용량 업로드 할 수 있게 도와주는 거 같다.

gitattributes .jpg