Git LFS

danbibibi·2022년 8월 24일
0

대용량 파일을 Git으로 관리하는 경우 Git 이력 파일의 크기 늘어나므로 clone, pull 동작시 많은 시간이 걸리게 된다. 그리고 100MB 넘어가면 push 불가능하다. 따라서 큰 파일이 포함된 프로젝트를 관리하려면 추가로 플러그인이 필요하고, 그게 바로 LFS이다.

AI의 경우 모델 가중치 파일을 LFS로 관리해야하는 경우가 많을 것이라 생각된다 :)

git lfs install # LFS 설치 
git lfs track model/naver_shopping.pt # LFS 파일 지정
git add .gitattributes
git add model/naver_shopping.pt 
git commit -m "model weight"
git push origin main

사용할 때는 아래와 같이 pull 받아서 사용하자!

git lfs pull
profile
블로그 이전) https://danbibibi.tistory.com

0개의 댓글