* git repack with a --reference
@ 2009-05-07 4:21 Jonathan Harker
2009-05-07 5:57 ` Miles Bader
2009-05-07 17:14 ` Brandon Casey
0 siblings, 2 replies; 3+ messages in thread
From: Jonathan Harker @ 2009-05-07 4:21 UTC (permalink / raw)
To: git
Hi - hope this isn't too noobish but I'm trying to get an existing git
checkout to repack/prune/gc itself such that it would be like I had
cloned it with --reference /path/to/local/repo (i.e. I've added
/path/to/local/repo to .git/objects/info/alternatives, and I'd like it
to reduce its objects from 200 MB to 5 MB). Is this
a. possible,
b. desirable, and
c. not insane?
Cheers,
Jonathan Harker
http://catalyst.net.nz/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git repack with a --reference
2009-05-07 4:21 git repack with a --reference Jonathan Harker
@ 2009-05-07 5:57 ` Miles Bader
2009-05-07 17:14 ` Brandon Casey
1 sibling, 0 replies; 3+ messages in thread
From: Miles Bader @ 2009-05-07 5:57 UTC (permalink / raw)
To: Jonathan Harker; +Cc: git
Jonathan Harker <jonathan@catalyst.net.nz> writes:
> Hi - hope this isn't too noobish but I'm trying to get an existing git
> checkout to repack/prune/gc itself such that it would be like I had
> cloned it with --reference /path/to/local/repo (i.e. I've added
> /path/to/local/repo to .git/objects/info/alternatives, and I'd like it
> to reduce its objects from 200 MB to 5 MB). Is this
>
> a. possible,
> b. desirable, and
> c. not insane?
I've done this in the past (using "git gc", but same difference I
guess), and it worked as you'd hope, reducing .git to something very
small.
I don't recall any real problems, but you might need to manually
remove any pack ".keep" files first though (I seem to recall something
like that, anyway).
-Miles
--
Friendship, n. A ship big enough to carry two in fair weather, but only one
in foul.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git repack with a --reference
2009-05-07 4:21 git repack with a --reference Jonathan Harker
2009-05-07 5:57 ` Miles Bader
@ 2009-05-07 17:14 ` Brandon Casey
1 sibling, 0 replies; 3+ messages in thread
From: Brandon Casey @ 2009-05-07 17:14 UTC (permalink / raw)
To: Jonathan Harker; +Cc: git
Jonathan Harker wrote:
> Hi - hope this isn't too noobish but I'm trying to get an existing git
> checkout to repack/prune/gc itself such that it would be like I had
> cloned it with --reference /path/to/local/repo (i.e. I've added
> /path/to/local/repo to .git/objects/info/alternatives, and I'd like it
> to reduce its objects from 200 MB to 5 MB). Is this
>
> a. possible,
>
> b. desirable, and
>
> c. not insane?
yes,yes,yes.
The path written to .git/objects/info/alternates (also notice spelling of
"alternates") should be the path to the objects directory, not to the
toplevel repository.
i.e.
/path/to/local/repo.git/objects
It should work properly since git v1.6.2.3.
-brandon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-07 17:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-07 4:21 git repack with a --reference Jonathan Harker
2009-05-07 5:57 ` Miles Bader
2009-05-07 17:14 ` Brandon Casey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).