git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] everyday: replace 'repack' with 'gc'

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Dec 20, 2007, 14:05 UTC
Message-ID
<1198159546-11368-2-git-send-email-vmiklos@frugalware.org>
In-Reply-To
<1198159546-11368-1-git-send-email-vmiklos@frugalware.org>
Most users don't want to run git repack manually, so suggest using gc instead.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 Documentation/everyday.txt |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index a09c1d9..f1993e2 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -30,8 +30,6 @@ Everybody uses these commands to maintain git repositories.
 
   * gitlink:git-fsck[1] to check the repository for errors.
 
-  * gitlink:git-repack[1] to pack loose objects for efficiency.
-
   * gitlink:git-gc[1] to do common housekeeping tasks such as
     repack and prune.
 
@@ -43,23 +41,20 @@ Check health and remove cruft.::
 ------------
 $ git fsck <1>
 $ git count-objects <2>
-$ git repack <3>
-$ git gc <4>
+$ git gc <3>
 ------------
 +
 <1> running without `\--full` is usually cheap and assures the
 repository health reasonably well.
 <2> check how many loose objects there are and how much
 disk space is wasted by not repacking.
-<3> without `-a` repacks incrementally.  repacking every 4-5MB
-of loose objects accumulation may be a good rule of thumb.
-<4> it is easier to use `git gc` than individual housekeeping commands
-such as `prune` and `repack`.
+<3> repacks the local repository and performs other housekeeping tasks. Running
+without `--prune` is a safe operation even while other ones are in progress.
 
 Repack a small project into single pack.::
 +
 ------------
-$ git repack -a -d <1>
+$ git gc <1>
 $ git gc --prune
 ------------
 +
-- 
1.5.4.rc0.67.gf9c5-dirty
Previous: Miklos Vajna
Message 2 of 2 in “everyday: replace 'prune' with 'gc --prune'”
  1. everyday: replace 'prune' with 'gc --prune'Miklos Vajna, Dec 20, 2007
  2. everyday: replace 'repack' with 'gc'Miklos Vajna, Dec 20, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.