개발 공부

(github) commit 내역 포함해서 clone 하기 본문

IT 상식

(github) commit 내역 포함해서 clone 하기

아이셩짱셩 2021. 7. 12. 09:57

1. Source repository clone

$ git clone --mirror [source repo _ https://github.com/계정/repo이름.git]

# 또는
# $ git clone --bare [source repo _ https://github.com/계정/repo이름.git]

2. git push to target repository

$ cd [source repo이름]

$ git push --mirror [target repo _ https://github.com/계정/repo이름.git]

3. 1번에서 clone한 임시 저장소 삭제 (option)

$ cd ..
$ rm -rf [source repo이름]

 

 

 

 

참고 :

https://hanul-dev.netlify.app/git/git-repository-%EC%9D%B4%EB%8F%99%ED%95%98%EA%B8%B0/

https://hongjuzzang.github.io/howto/git_mirror/

Comments