[github] Public repo를 private으로 바꾸기

public project를 가져와서 혼자 몰래 뭘 해보고 싶을 때, Apache 2.0 License 등 derived works의 source code 공개 의무가 없는 프로젝트의 경우 private으로 바꿔서 작업을 해볼 수 있다.

다음과 같이 한다.

먼저 만들고 싶은 이름으로 github에서 project를 하나 private으로 만든다.

$ git clone --bare https://github.com/publicproject/project.git
$ cd project.git
$ git push --mirror https://github.com/myname/myproject.git

그리고 나서 실제로 clone해서 쓰면 된다.

$ git push https://github.com/myname/myproject.git

최신 코드로의 업데이트는 public repository를 여기다 remote로 추가해서 fetch & rebase하면 된다.

push는 public으로 fork해온 후 거기다 push 해서 pull request하면 될 듯.

참고: https://medium.com/@bilalbayasut/github-how-to-make-a-fork-of-public-repository-private-6ee8cacaf9d3

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다