Git: make a branch as master on Github while keeping real master on BitBucket -
i have project hosted on bitbucket private project. project public trimming many source codes , configurations root project. have put public project on github.
since internal project, keep working on project in git manner, push public appropriate changes project on github. have been managing 2 projects using svn on both since svn tool had been used before git. push more stuffs internal public, feel stupid way it.
i think public project should master, since internal project has many additions on top of public, want stay away github internal project.
theproject(on github) ->(branch)theproject_internal(on bitbucket)
i want continue working on 'theproject_internal' , merge changes 'theproject' while keeping internal project absolutely forbidden public.
how can achieve without headaches git?
use tracking branches. suposing master
branch of bitbucket has changes you'll release public, on github repository:
$ git checkout -b master_of_bitbucket_on_github remote_bitbucket/master
this create master_of_bitbucket_on_github
branch on github repository, track master
branch of bitbucket.
if isn't done, you'll need configure remote branch remote_bitbucket
.
or can opposite: create tracking branch on bitbucket repository tracking branch of github if want no reference private repository on github repository.
Comments
Post a Comment