While studying Fullstack development with Integrify's bootcamp, I have created a couple of private forks from repositories from the different assignments I had to do to learn.
This is all great until the moment you actually need to showcase your portfolio and what you have done during this intense but great learning.
I have faced the issue of making public repository of private fork.
Here are the commands:
Open Terminal
Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)
$ git clone --bare https://github.com/exampleuser/private_repo.git
Mirror-push to the new repository
$ cd private_repo.git
$ git push --mirror https://github.com/yourname/public_repo.git
Remove the temporary local repository you created earlier
$ cd ..
$ rm -rf private_repo.git
Here you are with your former private fork/repository in your new public one ready to be showcased!
Hope this explanation helps you as much as it helps me!
Top comments (0)