GitLab에서 GitHub으로 레포지토리를 미러링시 100MB를 넘는 파일이 있다면 에러가 나며 미러링이 안 되는 문제가 있다.

File {파일명} is 105.41 MB; this exceeds GitHub's file size limit of 100.00 MB \nremote: error: GH001: Large files detected.

자세하게는 이런 내용으로 찍힌다. 이것을 지우고 다시 시도해도 기록상에는 남아있기 때문에 전부 지워줘야 한다.

 

git filter-branch --tree-filter 'rm -f 파일명' HEAD

해당 명령어를 실행하면 아래와 같이 뜬다.

정상적으로 되었으면 원격 레포지토리에 push 해준다.

git push 원격remote명 브랜치명 --force
ex) git push github master --force