You can always have as many public and private branches as you want. What makes them private is correct settings of remotes.
If it was a new project, I'd go about something like:
Create public project on GitHub
Clone it to a private machine (my workstation)
Hint: rename "origin" to something else to minimize confusion
Add another remote: bitbucket
Create a local branch based on master
Push the branch to bitbucket
(I'm using similar system for my dotfiles collection: I have a "private" branch that only exists in a bare repo on my station, and I clone it to the station and a few virtuals.)
When working, you want to be sure:
obviously, that you don't accidentally commit + push something private
to the public branch
that the private branch is set up correctly to follow the bitbucket remote,
not the "origin", i.e. GitHub
If you want use different machines to work on the project, consider creating own bare repository (maybe somewhere in your private network) where you can add as many pre-commit checks and hooks as needed (you can even grep content of source files).
That will make it easier to deploy the repo on another machine, plus can help reduce dependency on network or bring some access control in place.
Here's the final schema including the proxy:
.------------------------------------------------------------------------------.
: . . :
: [github.com] ----------. . [bitbucket.org]-. . :
: branches: : . branches: : . :
: master : . private : . :
: : : the internets :
:--------------------------:-----------------------:---------------------------:
: : : all your base :
: [local_git_proxy] '..................... : :
: remotes: : : :
: public git://github.com/...or.so..' : :
: private git://bitbucket.org/...or.so..' :
: branches: :
: master set up to follow public/master :
: private set up to follow private/private :
: any other team branches :
: hooks: :
: hooks to prevent you from leaking data to public :
: maybe some hooks to automate pushing/fetching :
: :
: [actual_dev_machine] :
: remotes: :
: origin: git://local_git_proxy/...or.so... :
: branches: :
: master set up to follow origin/master :
: private set up to follow origin/private :
: your own "crazy" branches :
: :
'------------------------------------------------------------------------------'