First of all, I'm new to git, and playing around to learn more. :)
I'm using Github for my public repo, and Bitbucket for private repo. Whenever I push to github, I manually cut out those unwanted things and then push them publicly and then paste them back again there to maintain the private repo as well.
But after learning git branch, I thought there're many ways I can manage this, but actually I'm not sure. What I thought is:
- I'll make a branch will all my public changes
- I'll use master with all my private changes (or it can be vice versa)
- Then on "private" branch I'll set
git remote add origin
to bitbucket repo HEAD, and push things - and on "public" branch I'll set
git remote add origin
to github repo HEAD, and push things
Am I on the right way? If not, how can I go then?