IT/System Engineering
[Git] Git 저장소 용량 줄이기
Jany
2023. 6. 12. 11:45
반응형
Github 저장소의 최대 용량은 2Gb 이다.
그래서 2Gb 가 넘을 경우 파일을 줄여야 하는데, 쉽지 않다.
#저장소 복제
git clone {저장소 주소}
# 저장소 크기 확인하기
git count-objects -v
#git 히스토리 삭제
rm -fr .git
#git 초기화
git init
#브랜치 변경
git checkout -b main
#로컬 파일 추가
git add .
#커밋
git commit -m "repository initialize"
#원격저장소 추가
git remote add -m main origin {원격 저장소}
#원격저장소 확인
git remote -v
#브랜치 변경
git branch -m master
#push
git push -f origin master
반응형