Is it possible to have a private branch in a public repo?
On GitHub, your repository is public or private; you cannot selectively "privatize" only a branch.
Is it possible to convert my own public repo into my own branch / fork?
You can clone your public repo to your local computer, if necessary, a branch, and just do not git push origin master "private" branches upstream (specifying which branch should push to the beginning: git push origin master or git push origin branch-i-want-to-be-public:master ).
What is the best way forward / how should I continue?
To take advantage of GitHub for your public and private development, I would suggest expanding your public branch on GitHub by changing the settings of the new plug to "Private" and then cloning the personal version to your local machine. When you're ready to post the changes, drag everything down to your private fork on GitHub, and then use pull requests to selectively copy branches to a public repo.
To make the repository private on GitHub, you must have an updated (paid) account. If you are just swinging a free account, you can still use the first process that I suggested: - clone the public to the local machine, branch and push certain "public" branches to the origin - without the need for a private repo.
If you have a paid GitHub account or use another service that offers public and private forks and transfer requests (for example, BitBucket ), then you can use any of the above methods to make your code public.
Justin ᚅᚔᚈᚄᚒᚔ Nov 02 '11 at 16:01 2011-11-02 16:01
source share