Git和客户/服务器代码分离 [英] Git and client/server code separation

查看:127
本文介绍了Git和客户/服务器代码分离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您正在构建一个分离的客户端和服务器端代码(不同的人)的软件 - 您会创建一个或两个存储库吗?

例如,我们有前端服务器,他们没有使用服务器代码,所以他们没有兴趣检查它。服务器端开发人员也不会更改客户端代码,但他负责构建/部署整个应用程序。什么是最佳做法?

解决方案

我将它设置为单独的存储库并使用子模块将它们导入到一个大的主存储库可以用来同步和测试。任何共享代码都可以在库项目中创建(另一个回购)。对于一个较小的项目来说可能看起来过于矫枉过正,但随着代码库开始增长,它将证明非常有用。


You are building a software with separated client and server-side code (different people) - would you create one repository or two?

E.g., we have front-end developers who are not working with server code, so they are not interested in checking it out. A server-side developer doesn't change client-side code too, but he is responsible for building/deploying the whole application. What is best practice?

解决方案

I would set it up as separate repositories and use submodules to import them into a big main repository that can be used to synchronize and test. Any shared code can be created in a library project (another repo). Might seem like an overkill for a smaller project but as the code base starts to grow it will prove quite useful.

这篇关于Git和客户/服务器代码分离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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