I have a project where the data
folder need to private (but tracked by VCS). So the entire git
repo on GitHub is private. The code, however, is quite useful to many people and so I'd like to keep that public.
Currently my repo has only a master
and dev
. Once features in dev
are working, they get merged into master
. I'd like to create a no_data
branch and have that push to a public GitHub repo. master
should continue tracking the private repo. I already have a private GitHub repo for this (let's call it private_project
). I can create a public repo called project
for the no_data
branch.
Questions:
a) How do I set this up so each branch track a separate repo?
b) Since the only thing different between the two branches is that the public one will ignore the data/
folder, I just plan to add that in a .gitignore
file. However, I'd like the rest of the code to stay the same in both branches. So I'm afraid that every time I merge master
to no_data
, I have to manually resolve the .gitignore
merge.