Re: How to extract files out of a "git bundle", no matter what?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 19, 2008, 20:07 UTC
- Message-ID
- <7vtz906iaa.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <87iqpgc6bn.fsf@jidanni.org>
jidanni@jidanni.org writes:
Show 12 quoted lines
> Someone has handed you a "git bundle". > How do you get the files out of it? > If it were cpio, you would use -i, if it were tar, you would use -x... > You read the git-bundle man page. > You only get as far as > # git-bundle verify bundle.bdl > The bundle contains 1 ref > d01... /heads/master > The bundle requires these 0 ref > bundle.bdl is okay > > The rest is mish-mosh.
The last example in the git-bundle man page might be a bit cryptic but that is how bundles are expected to be used. To give people repository access who do not have real network connection other than Sneakernet.
For one shot extraction, defining a remote in the config is overkill and you could just say:
git ls-remote bundle.bdl
to see what branches it contains and if you are interested in its master branch and want to merge it to your history, then
git pull bundle.bdl master
should do that.