{"thread":{"id":"9007","subject":"git .pack expansion question","startedAt":"2007-07-12T19:03:01Z","lastAt":"2007-07-12T20:58:44Z","messageCount":2,"participants":["Ryan Moszynski","Brian Gernhardt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"47194","messageId":"5ed683f50707121203q52084b72o106616f1c8710141@mail.gmail.com","threadId":"9007","inReplyTo":null,"subject":"git .pack expansion question","fromName":"Ryan Moszynski","fromEmail":"ryan.m.public@gmail.com","sentAt":"2007-07-12T19:03:01Z","receivedAt":"2007-07-12T19:03:01Z","isPatch":false,"sender":{"key":"ryan.m.public@gmail.com","avatar":null},"body":"hopefully this is the right list for this:\n\nam i understanding this right?\n\nif i run the command:\ngit-repack\nthis creates an .idx and a .pack file that together hold all the files\nand other metadata for my git directory.  What i can't figure out\nthough, is how to send just these two files to another machine over\nthe network, and then using only these two files, have git create a\nreplica of the original git directory that the .pack file was made\nfrom.  I've tried\n\nmkdir git-test\ncd git-test\ncp pack-92fadfab20e56acbbf28ed45851d61dc0d35c6ab.idx && .pack ./\ngit-init-db\ngit add .\ngit-unpack-objects < pack-92fadfab20e56acbbf28ed45851d61dc0d35c6ab.pack\n\n\nnow, the objects that were created from my original files are in the\nobjects directory, but I need them expanded so my git directory is a\ncopy of the one i originally git-repack'ed.  Is there an easy way to\ndo this?  This is for back up and archival purposes.\n\nhere are three ways i know to do this already, none of which I like very much.\n\ncloning a repository over a network,\ndrawback: git has to be installed on both machines\nor\nscp'ing my whole git directory over the network,\ndrawback: too many little files, scp is too slow\nor\ntar'ing up my git directory so i can send one file for everything,\ndrawback: since git already has a compression/expansion tool built in,\ni shouldn't have to use another to be able to do what i need.\n\nany comments appreciated,\n\nryan\n"},{"id":"47206","messageId":"873AE37B-16EA-409B-A488-96DFF2581B43@silverinsanity.com","threadId":"9007","inReplyTo":"5ed683f50707121203q52084b72o106616f1c8710141@mail.gmail.com","subject":"Re: git .pack expansion question","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2007-07-12T20:58:44Z","receivedAt":"2007-07-12T20:58:44Z","isPatch":false,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"\nOn Jul 12, 2007, at 3:03 PM, Ryan Moszynski wrote:\n\n> hopefully this is the right list for this:\n>\n> am i understanding this right?\n>\n> if i run the command:\n> git-repack\n> this creates an .idx and a .pack file that together hold all the files\n> and other metadata for my git directory.\n\nYou're not understanding it correctly.  The .pack files hold all the  \ndata from the git repository, but none of the metadata.  The .idx  \nfile is an index into the pack for speed and can be re-created from  \nthe pack itself.\n\nWhat you're looking for is git-bundle (added just after v1.5.0 it  \nlooks like).  `git bundle create <file-name> --all` will bundle up  \nall the branches from your repository.  It doesn't seem to want to  \ntake the tags when I do it that way, but it's definitely the right  \nstart.\n\n~~ Brian\n"}]}