开发者

Proprietary + Open Source setup in Git? (eg. chrome/chromium)

How would you setup an code repository where you have a proprietary version and an open source version, say like Chrome and Chromium?

With Git, would you use two branches or two repositories?

开发者_运维知识库How would you keep the "private" version up to date with the open source one?


If it were me, I would have two repositories. This way, you can have different permissions on each - public read access for the open source version and read/write for developers only on the "private" one.

To keep the private version up to date, I would set up a remote on the private version repository which points to the public version repository. This would allow you to pull or rebase changes from there onto the private one. This does however make the assumption that changes will not conflict (i.e. the private version feature-set is a super-set of the public version, rather than a divergence).


I would suggest two different repositories rather than branches. git pull and/or push will help you move changes from open source repo to proprietary repo.


Using your 2 repositories as git submodules, and additional meta-repository to track versions of both private and open-source repos.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜