代码之家  ›  专栏  ›  技术社区  ›  gavenkoa

将git历史作为单个文件转储?

git
  •  3
  • gavenkoa  · 技术社区  · 6 年前

    我想作为单个文件共享存储库。

    有没有可能用通常的git语法来限制历史,比如 v1..v2

    1 回复  |  直到 6 年前
        1
  •  4
  •   Hasturkun    6 年前

    您可能想创建一个git包。 这将创建一个稍后可以克隆的包。

    git bundle 命令。

    示例(摘自 Pro Git

    $ git bundle create repo.bundle HEAD master
    Counting objects: 6, done.
    Delta compression using up to 2 threads.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (6/6), 441 bytes, done.
    Total 6 (delta 0), reused 0 (delta 0)
    
    
    $ git clone repo.bundle repo
    Cloning into 'repo'...
    ...
    $ cd repo
    $ git log --oneline
    9a466c5 second commit
    b1ec324 first commit