git 로컬 용량을 조금이라도 줄이려면 쓸데없는 것들을 정리해보자.
$ git remote prune origin
remote 에 존재하지 않는 object 를 정리해준다.
참고 : https://aroundck.tistory.com/6529
[git] Git Prune 에 대해 알아보자
[git] Git Prune 에 대해 알아보자 https://www.atlassian.com/git/tutorials/git-prune - git pull (fetch) 과정에서 ref lock 에러를 마딱뜨렸는데, 이 때 해결방법중 하나가 'git remote prune origin' 을 수행..
aroundck.tistory.com
$ git lfs prune
오래된 LFS 파일들을 정리해준다.
참고 : https://github.com/git-lfs/git-lfs/blob/main/docs/man/git-lfs-prune.1.ronn
GitHub - git-lfs/git-lfs: Git extension for versioning large files
Git extension for versioning large files. Contribute to git-lfs/git-lfs development by creating an account on GitHub.
github.com
$ git gc --prune=now
불필요한 파일을 정리하고 로컬 저장소를 최적화해준다. --prune 옵션으로 오래된 파일들의 기준을 설정할 수 있는데 기본은 2주라고 한다.
참고 : https://git-scm.com/docs/git-gc
Git - git-gc Documentation
git gc tries very hard not to delete objects that are referenced anywhere in your repository. In particular, it will keep not only objects referenced by your current set of branches and tags, but also objects referenced by the index, remote-tracking branch
git-scm.com