git / Github:整合 - 1 个具有多个不同代码库的多个分支的存储库 - vs - 每个不同代码库的单独存储库
我们有一个 CMS,其中包含多个(大部分是不同的)mvn 构建的代码库,每个站点一个,再加上一些共享/通用代码和父项目,所有这些都位于单独的存储库中。
经理希望将所有或尽可能多的内容合并到 1 个 Github 存储库中 - 这与我们现在所做的不同,可能会使管理复杂化、容易出现合并错误、分支过多等。但是 - 还有其他一些吗这是好主意还是坏主意的根本原因?
我可以想象为存储库中的每个项目创建 master/qa/feature 分支,例如:
proj-1-master
proj-2-master
proj-3-master
proj-1-qa
proj-2-qa
proj-3-qa
proj-1-feat-x
proj-2-feat-y
proj-3-feat-z
parent-master
parent-qa
etc.
这会抛弃每个存储库的默认/主分支的概念吗?
这与我们一直在做的事情完全不同(我自然会反对改变!),所以我只是想看看人们的想法。
这似乎会破坏 Github 中的许可和团队 - 即如何阻止 proj-1 人员更新 proj-2 (有意或无意) - 受保护的分支可能会也可能不会提供帮助......但如果团队可以的话,可能不会不工作。
我还想知道的是,每个分支中都有完全不同的代码库(尽管可能有一些共享的目录结构) - 这会增加存储库的大小 - 尽管显然你可以克隆/下载一个分支而不是整个存储库?
感谢您分享您的想法!
We have a CMS with multiple (mostly disparate) mvn built codebases, one for each site, plus some shared / common code and parent projects, all in separate repositories.
A manager wants to combine all or as much of this as possible into 1 Github repo - it's different from what we do now and could complicate the management, be prone to merging errors, have too many branches, etc. but - are there some other fundamental reasons this is a good or bad idea?
I can imagine creating master/qa/feature branches for each project in the repo like:
proj-1-master
proj-2-master
proj-3-master
proj-1-qa
proj-2-qa
proj-3-qa
proj-1-feat-x
proj-2-feat-y
proj-3-feat-z
parent-master
parent-qa
etc.
Would this throw away the concept of a default/master branch per repo?
This is completely different from what we've been doing (and naturally I am bridling against change!), so I just wanted to see what people think.
It would seem to break permissioning and teams in Github - i.e. how to keep proj-1 people from updating proj-2 (intentionally or mistakenly) - protected branches might or might not be able to help ... but probably not if teams can't work.
The thing I also wonder about is having completely different codebases (though perhaps with some shared directory structure) in each branch - it would increase the repo size - although apparently you can just clone / download a branch vs the whole repo?
Thanks for sharing your thoughts!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不会这样做。
应该有一个主分支。
要么将所有内容放在一起并视为一个项目(带有子项目),要么根本不做类似的事情。
I would not do this.
There should be one master branch.
Either put everything together and treat is one project (with subprojects), or don't anything like that at all.