单独的分支机构或git项目? [英] Separate branches or git projects?

查看:91
本文介绍了单独的分支机构或git项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在公司介绍Git.我有几个应用程序都通过套接字一起交互,现在,将决定我是否应该使用

I'm introducing Git in our company. I have several applications that all interact together via sockets, and now, it is about to decide whether I should use

  • 针对我的应用程序的不同部分的单独分支,或者
  • 单独的Git项目.

我也想使用标签进行修订;如果使用分支,则必须标记branchnameV1.0, but if I use separate Git projects I could tag like v1.0`.

I also want to use tags for revisions; if I use branches, I have to tag like branchnameV1.0, but if I use separate Git projects I could tag likev1.0`.

最常规的方法是什么?

推荐答案

单独的Git项目:如果您打算合并通用代码源,则分支很有趣.

Separate Git projects: branches are interesting if you intend to merge common code source.

但是,如果您的应用程序是独立的(正在开发中,即使它们在运行时以某种方式链接在一起),则每个应用程序的git repo会更好地工作.
它将允许每个应用程序遵循其自己的开发生命周期,并具有自己的一组标签和分支.

But if your apps are independent (in development, even though they are somehow linked in runtime), a git repo per application will work better.
It will allow for each app to follow its own development lifecycle, with its own set of tags and branches.

如果您想跟踪这三个应用程序的哪个版本在给定时间一起工作,则可以创建第四个存储库,然后

If you want to keep track which versions of those three apps are, at a given time, working together, you can create a fourth repo, and register the first three as submodules.

这篇关于单独的分支机构或git项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆