I am trying to create a bundle file from commit x to commit y. As specified on git bundle's documentation the arguments have to be "acceptable to git rev-parse and git rev-list ..., that specifies the specific objects and references to transport" However, when I run the following command:
git bundle create test.bundle 15b423..6cffeab
I get the error
error: Refusing to create empty bundle.
Then I verified that the commits could be referenced by rev-list and rev-parse:
ana@DESKTOP-K400GGC MINGW64 ~/Projects/TEST1 ((20dc3fd...))
$ git rev-list 15b423b 6cffeab
6cffeabc7e3183fcca8cb8b91eecbf9e0af5a0e7
beb6fb7cfda467433cb2cdab362a25178b1ddf18
458cfcd0064b229f8b416d65405f18732d8c359a
53c90498e13edd32248842b3fd4fb7819041a1d6
ba087013804d4a39b36f3e679548fb45fe9645fb
ad1b1fde27be98b5b09d8e5a43137d16fd6e1840
540da9dea1b816a20be11e5c53b94467449266af
aa64d78ab5c990b047711b9f81fdae13beb27a05
15b423b91a63c403fe0ee0f3365c9846f37f3aa4
ana@DESKTOP-K400GGC MINGW64 ~/Projects/TEST1 ((20dc3fd...))
$ git rev-parse 15b423..6cffeab
6cffeabc7e3183fcca8cb8b91eecbf9e0af5a0e7
^15b423b91a63c403fe0ee0f3365c9846f37f3aa4
Why it doesn't work? How can I create a bundle file that ranges from commit A to commit B ?
From git bundle documentation (under Specifying References): "git bundle will only package references that are shown by git show-ref: this includes heads, tags, and remote heads." So if you added tags to those commits, your command should work.
I do agree that the line that you quoted makes it seem like your command would work, IMHO that's not very clear.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With