Re: How to extract files out of a "git bundle", no matter what?
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Dec 19, 2008, 19:32 UTC
- Message-ID
- <20081219193256.GU32487@spearce.org>
- In-Reply-To
- <87iqpgc6bn.fsf@jidanni.org>
jidanni@jidanni.org wrote:
Show 17 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. There should be an emergency example for non > git club members, even starting from apt-get install git-core, of the > all the real steps needed _to get the files out of the bundle_. > > Assume the user _just wants to get the files out of the bundle_ and > not learn about or participate in some project.
You can't just "get the files out". A bundle contains deltas, where you need the base in order to recreate the file content. It can't be unpacked in a vacuum.
To unpack a bundle you need to clone the project and then fetch from it:
git clone src... git pull bundle.bdl master
If the bundle requires 0 refs (like above) then you can init a new repository and should be able to fetch from it:
git init git pull bundle.bdl master
-- Shawn.