반응형
Error
대용량 파일 git push 시 아래와 같은 에러 발생
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags origin main:main
POST git-receive-pack (chunked)
remote: error: Trace: aeceddb3b4c7c5142e1618a5f8b26bfa13a3980ad802b5ffa38c6dc7995b1df5
remote: error: See https://gh.io/lfs for more information.
remote: error: File yolov9/runs/train/exp10/weights/last.pt is 195.11 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File yolov9/runs/train/exp3/weights/best.pt is 195.11 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File yolov9/runs/train/exp6/weights/best.pt is 195.11 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File yolov9/runs/train/exp6/weights/last.pt is 195.11 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File yolov9/runs/train/exp3/weights/last.pt is 195.11 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File yolov9/runs/train/exp7/weights/best.pt is 195.11 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File yolov9/runs/train/exp7/weights/last.pt is 195.11 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File yolov9/runs/train/exp10/weights/best.pt is 195.11 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
Pushing to https://github.com/choisungyoung/small-project
To https://github.com/choisungyoung/small-project
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/choisungyoung/small-project'
오류가 나면서 완료됨.
반응형
Solution
GitHub에 대용량 파일을 푸시하기 위해선 lfs을 이용해서 파일들을 트레킹 해야함.
lfs 설치
git lfs install
파일 트레킹
git lfs track "yolov9/runs/train/**/*.pt"
다시 푸시하면 정상적으로 업로드 됨.
Thank you!
반응형
'Tools > gibhub' 카테고리의 다른 글
[git] git commit 되돌리기, 커밋 취소 (0) | 2024.05.24 |
---|---|
[GitHub Actions] GitHub Actions에서 Secrets 환경변수 사용하기 (0) | 2022.08.22 |
[GitHub Actions] GitHub Actions를 이용하여 Node Project CI 해보기 (0) | 2022.08.22 |
[github Desktop] local에서 생성한 프로젝트로 새 repository 만들기 (0) | 2020.12.09 |