From: "Stephen R. van den Berg" <srb@cuci.nl>
To: skillzero@gmail.com
Cc: git@vger.kernel.org
Subject: Re: Best way to optimize a git repository?
Date: Sat, 3 May 2008 12:02:35 +0200 [thread overview]
Message-ID: <20080503100235.GA16989@cuci.nl> (raw)
In-Reply-To: <2729632a0805021734h72196639x8789a00ce9be4059@mail.gmail.com>
skillzero@gmail.com wrote:
>I want to periodically optimize my repositories even if it takes a
>long time to run the command. Should I do 'git gc --aggressive', 'git
>I also read somewhere (but can't find now) that some of these commands
>shouldn't be run while other people might be accessing the repository.
Caveat emptor, indeed.
I have in my /etc/gitconfig the following:
[repack]
UseDeltaBaseOffset = true
[pack]
compression = 9
[alias]
packall = !rm -rf .git/ORIG_HEAD .git/FETCH_HEAD .git/index .git/logs .git/info/refs .git/objects/pack/pack-*.keep .git/refs/original .git/refs/patches .git/patches && git prune --expire now && git repack -a -d --window=200 && git gc
A subsequent "git packall" does the trick, but this is best done on an
otherwise idle repository.
--
Sincerely, srb@cuci.nl
Stephen R. van den Berg.
"What do I do when I see someone *extremely gorgeous*?
I stare, I smile, and when I get tired... I put the mirror down."
prev parent reply other threads:[~2008-05-03 10:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-03 0:34 Best way to optimize a git repository? skillzero
2008-05-03 10:02 ` Stephen R. van den Berg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080503100235.GA16989@cuci.nl \
--to=srb@cuci.nl \
--cc=git@vger.kernel.org \
--cc=skillzero@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).