Category Hierarchy

我需要将完整的存储库转移到新的非联网计算机,最好是作为单个文件实体。git的捆绑允许git fetchgit pull操作风格在sneakernet环境,但似乎假设你已经在目标计算机上回购的工作版本。

什么是正确的调用:

  1. 捆绑当前仓库中的所有分支
  2. 在目标目录上启动新存储库,即正确安装根提交

我已经向上游发送了一个补丁以进行澄清:

`git clone` can use any bundle created without negative refspecs
(e.g., `new`, but not `old..new`).
If you want to match `git clone --mirror`, which would clone other
refs such as `refs/remotes/*`, use `--all`.
If you want to provide the same set of refs that a clone directly
from the source repository would get, use `--branches --tags` for
the `<git-rev-list-args>`.

因此$ git bundle create repo.bundle --branches --tags最适合克隆。

$ git bundle create repo.bundle --all 将提供源计算机的镜像,包括它的远程引用。

转载请注明出处:http://www.ydsst.com/article/20230526/890531.html