【问题标题】:Git : How to get a snapshot of a git repositoryGit:如何获取 git 存储库的快照
【发布时间】:2010-10-11 13:51:09
【问题描述】:

我正在寻找正确的方法来获取没有 .git/ 目录的 git 存储库存档,以便向测试人员发送每日快照。

【问题讨论】:

    标签: git archive snapshot


    【解决方案1】:
    git archive HEAD --format=zip > archive.zip
    

    这就像它在锡上所说的那样。

    更多信息在这里:http://gitready.com/intermediate/2009/01/29/exporting-your-repository.html

    【讨论】:

    【解决方案2】:

    这将导致archive.tar.gz并添加一个名为“prefix-dir”的前缀目录:

    git archive --prefix=prefix-dir/ -o archive.tar HEAD
    gzip archive.tar
    

    【讨论】:

      猜你喜欢
      • 2019-08-30
      • 1970-01-01
      • 2013-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-06
      • 2011-03-25
      • 2013-03-10
      相关资源
      最近更新 更多