开发者

git bundle from stash divergence point up to stash

开发者 https://www.devze.com 2023-03-18 06:03 出处:网络
I want to create a git bundle that contains just the commits in my stash that aren\'t in the point the stash is based off of. I want to do this as opposed to sending every single commit ever made, sin

I want to create a git bundle that contains just the commits in my stash that aren't in the point the stash is based off of. I want to do this as opposed to sending every single commit ever made, since I know the recipient already has every commit up to and including the divergence point.

I am getting this:

$ git bundle create ehhh stash...master^1
fatal: Refusing to create 开发者_开发技巧empty bundle.

...which makes no sense, as git rev-list stash...master^1 returns two commits.

Am I not understanding the tool or is this a limitation?


The problem is that the treeish stash...master^1 isn't interpreted correctly by bundle. A workaround is to create a tag:

git tag bundle_end master^1
git bundle create ehhh stash...bundle_end

Note that treeish range specifiers retrieve all commits since the beginning, not including the beginning commit itself.

0

精彩评论

暂无评论...
验证码 换一张
取 消