728x90
반응형

깃랩에 있는 레퍼지토리를 깃허브로 옮길일이 생겼다.

미러링을 걸어놔서 신경을 안쓰고있었는데,

이틀전부터 미러링이 안되고있었다.

 

원인을 찾아보니, 100mb 이상의 커밋이 발생하여 해당 미러링이 안된것으로 보였다.

 

일단 github 에 새로운 레파지토리를 만들고

 

git clone --mirror [클론할 레포지토리]

 

로 커밋메세지등을 클론했다.

 

그 후에, 

 

https://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

 

링크에서 우측

을 통해 커밋로그를 삭제하는 파일을 받아준다.

 

해당 파일을 클론한 레포지토리의 루트에 위치 시켜주고

 

 

 java -jar bfg-1.14.0.jar --strip-blobs-bigger-than 100M [클론한 레퍼지토리.git]

 

를 통해 100M 이상의 커밋 로그를 삭제해준뒤

 

같은 루트에서 cd [클론한 레퍼지토리.git]

 

을 한후, 

 

git push [옮길 레퍼지토리] -f --mirror

 

를 통해 레퍼지토리로 옮겨줬다.

 

후에 다시 gitlab에서 웹훅을 걸어주었다.

728x90
반응형

+ Recent posts