다른 계정의 저장소를 이관해오거나, 깃헙에서 다른 깃 플랫폼으로 커밋로그를 포함해서 이관해야하는 경우가 있다.
이럴 때 이관하는 방법이고, 깃헙 이외에도 사용 가능하다. 윈도우랑 리눅스 둘 다 가능하다.
1. 이관할 깃 저장소의 주소 확인

2. 이관에 사용할 임시 폴더 생성 후(안해도 됨) 클론해온다.
git clone --bare [git 주소]

3. 이관할 저장소를 만들고 git 주소를 복사한다.


4. 새로운 저장소로 push 진행
git push --mirror [새로운 git 주소]

5. 파일 정리

새로운 저장소로 가보면 커밋로그까지 포함해서 정상적으로 이관된 것을 볼 수 있다.

References
https://docs.github.com/en/repositories/creating-and-managing-repositories/duplicating-a-repository
Duplicating a repository - GitHub Docs
Note: If you have a project hosted on another version control system, you can automatically import your project to GitHub using the GitHub Importer tool. For more information, see "About GitHub Importer." Before you can push the original repository to your
docs.github.com
댓글