[Github] Repository Migration (Mirror)

Taekyu Lim·2022년 8월 2일
0

Github을 사용하다보면 다른 Repository로 Migration 해야 하는 경우가 있다.
이 때, 모든 Branch와 기존 Commit내역들 까지 모두 Migration하려면 다음과 같이 할 수 있다.

  1. Migration하기 위한 새로운 Repository 생성

  2. 기존 Repository의 bare clone 생성

$ git clone --bare https://github.com/exampleuser/old-repository.git
  1. 2.에서 생성한 repository 폴더로 이동
$ cd old-repository.git
  1. 이동할 새로운 Repository에 mirror push
git push --mirror https://github.com/exampleuser/new-repository.git

만약 기존 Repository에서 Github Action으로 CI/CD를 하고있었고,
이 때 Credential을 사용하고 있었다면,
다음 경로에 있는 Credential들을 새로운 Repository에도 다시 만들어야 합니다.

https://github.com/[Account]/[Repository]/settings/secrets/actions

profile
Mobile Engineer (Android, Flutter) / 정보관리 기술사

0개의 댓글