How to keep/maintain public and private code in th

2019-03-31 21:03发布

I'm working on my own project which has two parts:

A. kernel/generic code (public part)

B. code which works with proprietary protocol etc (private part, available for me and a few authorized persons)

I want repository hosting (maybe github, assembla, ...) which allows working in public and private branches in the same repository.

I don't want two repositories because I'm actively working on both parts and I want to avoid diverged repositories.

Which solution is available for me?

1条回答
Ridiculous、
2楼-- · 2019-03-31 21:27

which allows working in public and private branches in the same repository.

That doesn't seem compatible with how Git works: if you have access to a repo, you can clone all its content (including the branches).

A Git Hosting service like BitBucket or GitLab allows you to protect a branch (meaning you cannot push back). But you would still be able to see its content.
Even Gitolite doesn't prevent read-access at a branch level.

So two separate repos are still the best approach, with the repo A (kernel) declared as a submodule of repo B.

查看更多
登录 后发表回答