Gitlab -> Github 100mb 이상 migration
1. Git lfs와 BFG Repo Cleaner를 설치
rtyley.github.io/bfg-repo-cleaner/
BFG Repo-Cleaner by rtyley
$ bfg --strip-blobs-bigger-than 100M --replace-text banned.txt repo.git an alternative to git-filter-branch The BFG is a simpler, faster alternative to git-filter-branch for cleansing bad data out of your Git repository history: Removing Crazy Big Files Re
rtyley.github.io
2. 복사하고자 하는 저장소(GitLab)의 clone을 생성
git clone --mirror https://gitlab.com/user_id/old-repo.git
3. 커밋 히스토리 내에서 Large file를 찾아 tracking
git filter-branch --tree-filter 'git lfs track "*.{zip,jar}"' -- --all
4. BFG를 이용하여 해당 파일들을 Git lfs로 변경
java -jar ~/bfg-repo-cleaner/bfg-1.13.0.jar --convert-to-git-lfs '*.zip'
java -jar ~/usr/bfg-repo-cleaner/bfg-1.13.0.jar --convert-to-git-lfs '*.jar'
5. 새로운 저장소(GitHub)로 mirror-push를 진행
cd old-repository.gitgit push --mirror https://github.com/user_id/new-repo.git
❕ 100M 이상 파일 & commit 기록 지우기.
java -jar bfg.jar --strip-blobs-bigger-than 100M
출처: https://xtring-dev.tistory.com/entry/Git-GitLab에서-GitHub로-Repository-commit-log를-유지하며-Clone하기