gitlab의 repo를 github로 옮기기

leena·2022년 4월 13일
0

3년전에 gitlab을 사용하면서 포트폴리오를 올렸던 게 생각는데,
어찌저찌 계정을 찾고 옮길 수 없나 싶었는데 역시나 방법은 있었다.
gitlab에서 작업한 commit log까지 전부 복사된다.

Repository mirroring

  • 터미널에서 복사할 gitlab의 bare clone을 생성한다.
git clone --bare https://gitlab.com/[userid]/gitlab_repo.git

  • github에 새로운 저장소를 만든다.

  • github 저장소로 mirror-push를 하려면 터미널에서 아래와 같이 명령어를 입력한다.
cd gitlab_repo.git
git push --mirror https://github.com/[userid]/github_repo.git
profile
배움을 즐기고, 익히고, 기록합니다 :)

0개의 댓글