Fork git public to private

First, duplicate the repo as others said (details here):

Create a new repo (let’s call it private-repo) via the Github UI. Then:

git clone --bare
cd public-repo.git
git push --mirror
cd ..
rm -rf public-repo.git

Clone the private repo so you can work on it:

git clone
cd private-repo
make some changes
git commit
git push origin master

To pull new hotness from the public repo:

cd private-repo
git remote add public
git pull public master # Creates a merge commit
git push origin master

Your private repo now has the latest code from the public repo plus your changes.