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

女生的网名这么多〃 提交于 2019-12-11 13:38:32

问题


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?


回答1:


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).




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/2026851/proprietary-open-source-setup-in-git-eg-chrome-chromium

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!