git은 단일 파일이 100mb를 초과하는경우에는 일반 commit으로는 진행이 어렵다
이때 무료로 2gb까지 지원하는 git lfs를 설치 및 사용하면 파일 업로드가 가능하다
https://newsight.tistory.com/330
Git LFS (Large File Storage) 사용하기
Git의 용량제한과 LFS기본적으로 git은 여러개의 작은 소스코드 파일들을 위한 버전 컨트롤 시스템(VCS)이다. 따라서 Github의 경우 50Mb부터 Warning이 표시되고, 100Mb부터는 push시 Error가 발생한다. 그럼
newsight.tistory.com
https://miiingo.tistory.com/333
[Git] Ubuntu 16.04에서 Git LFS(Large File Storage) 사용법
Git LFS란? 프로젝트를 GitLab에 올리려고 했더니 다음과 같은 오류가 발생했다. remote: GitLab: LFS objects are missing. Ensure LFS is properly set up or try a manual "git lfs push --all". To http://localhost:9010/honeybee/issuer-rest
miiingo.tistory.com
로컬에 설치
# git lfs 설치(git bash)
git lfs install
# git lfs가 추적할 파일 확장자 지정
git lfs track "*.zip"
# .gitattributes 생성
git add .gitattributes
# .gitattributes 확인
cat .gitattributes
#*.zip filter=lfs diff=lfs merge=lfs -text
# git config 설정
git config lfs.allowincompletepush true
# git add/commit push 실행
서버에서 설치
https://packagecloud.io/github/git-lfs/install#bash-deb
github/git-lfs - Installation · packagecloud
Installation instructions for the github/git-lfs package repository.
packagecloud.io
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt install git-lfs
# sudo 권한이 없을 경우
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
apt install git-lfs
lfs설정이 다 된뒤에 필요한곳에서 git clone으로 가져와야지만 lfs가 설정된 상태로 가져와짐!!!
기존에 clone으로 가져온 repo가 있다면 삭제 후 다시 가져오기
commit한개당 파일 용량이 누적으로 적용되므로 변화하는 데이터를 적용하면 용량이 많이 필요
제거방법
https://blog.syki66.com/2021/04/09/git-lfs-untrack/
[git lfs untrack] 깃, lfs 추적 해제, 원격 저장소 lfs 저장공간 확보 | syki66 blog
How to untrack git lfs files
blog.syki66.com
npm config get registry
확인후 기본 레지스트리 아닐시 변경 필요
npm config set registry https://registry.npmjs.org/
'개발환경 > GIT' 카테고리의 다른 글
Git - fatal: refusing to merge unrelated histories (0) | 2023.02.13 |
---|