파일을 github에 push하려는데, 아래와 같은 에러를 마주쳤다.
내가 올리려면 파일은 123mb였는데 100mb가 넘어가서 아래의 에러가 발생한 것이였다.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
이러한 경우, git-lfs
을 사용하여 용량이 큰 파일(100mb~)을 원격 저장소에 올릴 수 있다.
// 1. git-lfs 설치
brew install git-lfs
// 2. 폴더(source code)로 이동하여 lfs 설치
git lfs install
// 3. 용량이 큰 파일 등록
git lfs track [FILE_NAME]
// 4. 원격 저장소에 push
git add .gitattributes
git add [FILES]
git commit -m [COMMIT_MESSAGE]
git push origin main
git-lfs
: Git Large File Storagelfs
로 트래킹되는 파일은 .gitattributes
를 통해서 관리된다. git rm -r --cached "*"
커맨드를 사용하여 클리어한다.