如何在git repo中组织项目的不同部分? [英] How to organize different parts of project in git repo?

查看:132
本文介绍了如何在git repo中组织项目的不同部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个项目中,我必须组织项目的多个部分。用php编写的web应用程序,用nodejs编写的api服务器以及android和ios应用程序。将它们分成多个回购区是不错的主意?或单独的文件夹在一个单一的git回购?

In a single project I have to organize multiple parts of the project. A web app written in php, api server written in nodejs and android and ios apps. Would it be good idea to separate these in to multiple repos? Or separate folders in a single git repo?

推荐答案

如果您打算重新使用这些单独的项目 git子模块。然而,如果你不这样做,我会简单地将它们分开放在不同的文件夹下。

If you plan to re-use those separate "projects" you should use a git submodule. However if you don't, I would simply separate them in different folders under one unique git.

git子模块适用于可以克隆并保持到目前为止在任何其他(更大的)项目中。

git submodules are great for projects that can be "cloned" and keep up to date in any other (bigger) projects.

请注意,它在处理子模块时增加了一些复杂层。

Be aware that it is adding some complexity layer when dealing with submodules.

这篇关于如何在git repo中组织项目的不同部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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