- Create empty private repo
- Bare clone a public repo, and mirror push it to the private 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
- Register remote repository with public repositoryPermalink
git clone https://github.com/yourname/private_repo.git
cd private_repo
git remote add public https://github.com/exampleuser/public_repo.git
Fetching from public repo
git pull public master
git push origin master