在一个项目中,我需要组织多个部分。包括用 PHP 编写的 Web 应用程序、用 Node.js 编写的 API 服务器以及 Android 和 iOS 应用。将它们分开成多个仓库或者是单个 Git 仓库中的不同文件夹里,哪种方法更好呢?
在一个项目中,我需要组织多个部分。包括用 PHP 编写的 Web 应用程序、用 Node.js 编写的 API 服务器以及 Android 和 iOS 应用。将它们分开成多个仓库或者是单个 Git 仓库中的不同文件夹里,哪种方法更好呢?
git submodule update
git submodule foreach make
git init
git submodule add ssh://.../ncs
...
git submodule add ssh://.../test_network
vim Makefile #write the Makefile for the whole project
git add Makefile
git commit -i -m "Makefile added"
git submodule foreach autoreconf -i
git submodule foreach ./configure
make test
我会将它们作为独立的项目保留。如果需要合并 git 仓库,您可以随时使用git 子模块。