在 gith/github 中创建新的 SW 变体时,我们应该创建一个新的分支还是一个新的存储库?
我正在开发嵌入式软件,该项目现在有一个新的变体,它共享大约 90% 相同的代码,但将来不能合并回去。
那么我应该在旧存储库中创建一个新分支,还是为新变体创建一个新存储库?
更多背景信息:这两个变体应具有相似的要求,对于某些模块来说它们是完全相同的,而少数模块则不然。
当新功能出现时,可能会在不同的变体上有所不同或有不同的实施时间表。
我想要获得的是,两个变体上的类似代码更改可以重用/共享,这意味着不必编写相同/相似的代码两次。不确定这是否可能。
I am developing the embedded SW, and the project now has a new variant which share about 90% same code but can not be merged back in the future.
Then shall I create a new branch in the old repo, or just create a new repo for the new variant?
And more background: the 2 variants shall have similar requirements, for some modules they are totally same, few modules are not.
And when new feature comes, may diff on different variant or have different implementation schedules.
What I want to obtain is that similar code changes on 2 variants can be reused/shared which means do not have to write the same/similar code twice. Not sure if this is possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
理想情况下,公共代码可以在其自己的存储库中隔离,然后引用为子模块:
这样,您可以在公共代码存储库中进行演变并快速更新每个项目存储库。
Ideally, the common code could be isolated in its own repository, and then referenced as submodule in:
That way, you can make evolutions in the common code repository and quickly update each project repository.