Duplicate public to private repository Create empty 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
cd ..
rm -rf public-repo.gitgit clone https://github.com/yourname/private_repo.git
cd private_repo
git remote add public https://github.com/exampleuser/public_repo.gitgit pull public master
git push origin masterbe careful of branches!