如何使用 git

编程入门 行业动态 更新时间:2024-10-18 10:16:27
本文介绍了如何使用 git-archive 从裸存储库中包含子模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设置部署脚本.基本流程是:

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:关键词]

本文发布于:2023-03-31 03:12:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/794946.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   git

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!