【发布时间】:2020-11-25 09:33:13
【问题描述】:
我发布一个自我回答是因为我知道我的一些同事很快就会在谷歌上搜索这个问题。我们有时需要分发以 master 为基线的捆绑文件,因此仅包含创建时明确包含的特定分支。例如,分销商这样做:
git bundle create ../file.gitbundle master..feature/aunit_reporters
问题是,在收到捆绑文件后,执行git pull ../file.gitbundle 给出:
fatal: Couldn't find remote ref HEAD
我已通过以下方式验证了捆绑文件应该适用:
git bundle verify ../file.gitbundle
The bundle contains this ref:
4f969119b208b71f4893222810600862 refs/heads/feature/aunit_reporters
The bundle requires this ref:
fd9801b79b56f5dd55ab1e6500f16daf
并且git show fd9801b79b56f5dd55ab1e6500f16daf 正确显示了所需的提交,而不是提供fatal: ambiguous argument '[commit-hash]': unknown revision or path not in the working tree,这表明我没有必要的基线提交。
【问题讨论】:
标签: git git-bundle