티스토리 뷰

public to private repository 복사

Github UIprivate-repo 를 통해 새로운 Repo를 생성하십시오 . 이후

git clone --bare https://github.com/exampleuser/public-repo.git
cd public-repo.git
git push --mirror https://github.com/yourname/private-repo.git
cd ..
rm -rf public-repo.git

명령어 입력


개인 repo를 복제하여 작업 할 수 있습니다.

git clone https://github.com/yourname/private-repo.git
cd private-repo
make some changes
git commit
git push origin master


public 에서 풀받기

cd private-repo
git remote add public https://github.com/exampleuser/public-repo.git
git pull public master # Creates a merge commit
git push origin master


Finally, to create a pull request private repo -> public repo:

The only way to create a pull request is to have push access to the public repo. This is because you need to push to a branch there (here's why).

git clone https://github.com/exampleuser/public-repo.git
cd public-repo
git remote add private_repo_yourname https://github.com/yourname/private-repo.git
git checkout -b pull_request_yourname
git pull private_repo_yourname master
git push origin pull_request_yourname

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함