git

기존 repository를 복제한 후(fork 아님), 새로운 repository에서 수정하기

★ ☆ 2022. 9. 29. 15:34

1. 기존 repository를 복제하여 새로운 repository를 만든다.

https://projooni.tistory.com/entry/%EA%B8%B0%EC%A1%B4-Git-Repository%EB%A5%BC-%EB%B3%B5%EC%82%AC%ED%95%98%EC%97%AC-%EC%83%88%EB%A1%9C%EC%9A%B4-Repository-%EB%A7%8C%EB%93%A4%EA%B8%B0

 

기존 Git Repository를 복사하여 새로운 Repository 만들기

보통 Git Repository를 복사할 때 fork 를 많이 사용한다. fork 는 사실상 clone 과 큰 차이가 없지만, github.com 내에서 바로 검색이 되진 않는다. fork 의 원래 의도는 bugfix를 위해 기존 repository를 복사하..

projooni.tistory.com

git clone --mirror {old_repository_url}

 

cd {old_repository_folder}.git

git remote set-url --push origin {new_repository_url}

git push --mirror

 

 

2. 새로운 repository를 clone하여 일반적인 방식으로 사용한다.

 

git clone {new_repository_url}

 

git remote add {name_you_want} {new_repository_url}

     e.g.  git remote add origin https://github.com/usrname/repositoryname.git