我想创建一个 git 包,它只包含我的存储中不在存储所基于的点的提交。我想这样做而不是发送每一次提交,因为我知道收件人已经有每一次提交,包括分歧点。
我得到这个:
$ git bundle create ehhh stash...master^1
fatal: Refusing to create empty bundle.
...这没有意义,因为 git rev-list stash...master^1
返回两个提交。
是我不了解该工具还是这是一种限制?
最佳答案
问题是 treeish stash...master^1 没有被 bundle 正确解释。解决方法是创建一个标记:
git tag bundle_end master^1
git bundle create ehhh stash...bundle_end
请注意,树形范围说明符会检索自开始以来的所有提交,不包括开始提交本身。
关于git bundle 从 stash 分歧点到 stash,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6614412/