Ross Rogers
Ross Rogers

Reputation: 24270

How do you extract a git "snapshot" retrieved from a git web interface?

When I download a tar gzip'd snapshot of the "archer-tromer-python" branch of gdb using this link and then gunzip and un-tar the file using 7-zip, I get a file 140 MB file named archer-archer-tromey-python-b23c218.

How are you supposed to untar this object? Do I have the wrong usage model? Isn't getting all the files of a specific revision without the .git repository what snapshots are for?

I'm behind a firewall, which is why I'm trying to get the tar-ball instead of doing a git clone of the repository.

Upvotes: 0

Views: 610

Answers (1)

Mark Longair
Mark Longair

Reputation: 468191

If you can download the tarball with that link, you'll be able to clone over HTTP. I'd suggest that you do that with:

git clone http://sourceware.org/git/archer.git

... and then you can checkout the branch you're interested in with:

cd archer
git checkout -t origin/archer-tromey-python

... which will be ultimately much more useful than dealing with the tarball.


If you do want to use that tar archive, this may be of some use:

The archive you've linked to is actually rather strange - it's a tar archive that's been compressed gzip twice. So, to unarchive it you'll need to do:

gunzip archer-archer-tromey-python-b23c218.tar.gz
tar xzvf archer-archer-tromey-python-b23c218.tar

Upvotes: 1

Related Questions