问题描述
我正在设置部署脚本.基本流程是:
I'm in the process of setting up a deployment script. The basic process is:
将更改推送到服务器上的裸仓库然后根据新标签为发布创建一个新文件夹.使用 git archive 将文件移动到发布目录运行一些迁移脚本并使其生效(如果一切成功).问题是我的存储库包含一个子模块,该子模块未放入存档中,因此未放入发布目录中.
The issue is my repository contains a submodule, which doesn't get put in the archive, and therefore doesn't get put in the release directory.
我见过 git-archive-all,但这在裸机上不起作用存储库.
I've seen git-archive-all, but that doesn't work on a bare repository.
如果不可能,我正在考虑,
If its not possible, I'm considering,
使存储库不是空的,并更新工作副本,这将允许我使用 git-archive-all.或者在服务器上有第二个子模块的裸存储库,我可以从中获取存档(必须查看此内容以确保我获得正确的修订版).推荐答案
我使用这个 python 包 https://github/Kentzo/git-archive-all.您可以使用
I use this python package https://github/Kentzo/git-archive-all. You can install it by using
pip install git-archive-all
在 OSX 上,您也可以使用 brew install git-archive-all
On OSX, you can install it also using brew install git-archive-all
这篇关于如何使用 git-archive 从裸存储库中包含子模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论