这可能很糟糕,我不确定。
假设我们有一个带有工作目录的仓库“产品”
/product
/product/command.script
/product/config/ (bare git repo)
还有一个带有工作目录的仓库“config”
/config
/config/config.json
command.script 文件具有与裸仓库交互的操作。前任。运行 command.script BRANCH1 将运行命令
git show BRANCH1:config.json
有什么办法可以让“/product/config/”文件夹成为“product”repo的子模块,这样当“product”repo被克隆时,“config”repo也将被克隆
git clone --bare [config origin here] config
从它的来源和当“产品”回购被提取时,“/product/config”子模块可以被提取
git fetch origin '*:*'
或者这是应该通过某种钩子处理的东西?