git 分支实践
我正在使用 Git 作为 Visual Studio 解决方案。 这是溶胶的结构。
myProject.Domain、myProject.Common、myProject.Core、webClientForCustomer1、webClientForCustomer2
顾名思义,webClient 项目都依赖于 Domain、Common 和 Core 项目。 我为每个客户创建一个新的 Web 客户端应用程序并进行 UI 自定义。 我向其他三个项目添加了新功能,因此 Web 客户端项目必须使用新功能进行更新。
您对将我的存储库建模为分支有何建议?
I am using Git for a Visual Studio solution. Here is the structure of the sol.
myProject.Domain, myProject.Common, myProject.Core, webClientForCustomer1, webClientForCustomer2
As the names imply, webClient projects all depend on Domain, Common and Core projects. I create a new web client app for each customer and make UI customizations. I add new features to other three projects, so web client projects must be updated with the new features.
What is your suggestion to model my repository into branches?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这听起来非常接近分支的“颠覆廉价复制”表示。 子模块更适合用于识别不同的文件组。
分支是,特别是在 Git 或其他 VCS 中,“
另外,对于 Git,还有发布(到其他 Git 存储库)的概念。
Jakub Narębski 有一个关于这个问题的优秀帖子
That sound dangerously close to the "Subversion cheap copy" representation of branches. Submodules are much better suited for identifying different group of files.
A branch is, especially in Git or other VCS for which "branch" is a first-class citizen, a way to isolate your work from other parallel work.
Creating branches is not something you do because you have myProject.xxx directories, but because you want to isolate your development effort from other activities (like maintaining your current application, making a fix, doing a refactoring, and so on)
Plus, with Git, there is also the notion of publication (to other Git repositories).
Jakub Narębski has an excellent post on that issue
我不确定分支是你想要的。 我会考虑为您的框架提供一个存储库,并为您的客户各提供一个存储库。 然后我会使用 Git Submodules 将您的框架链接到客户端项目中,就像它真的住在那里。 检查 Git 用户手册第 8 章 了解更多
I'm not sure branching is what you want. I'd consider one repo for your frameworks, and a repo each for your clients. Then I'd use Git Submodules to link your framework into the client project, just like it really lived there. Check the Git User's Manual chapter 8 for more
您是否考虑过使用子模块而不是您的域的分支,常见和核心项目?
从 git 子模块手册页:
Have you considered using submodules rather than branches for your Domain, Common and Core projects?
From the git submodules man page: