threads / patch / 11371

patcheveryday: replace 'repack' with 'gc'

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

## tl;dr

2 messages between Dec 20, 2007 and Dec 20, 2007. Diffs are folded; open one to read it.

replies: 1people: 1as markdown or json

Miklos Vajna· Dec 20, 2007, 14:05 UTC · lore

[PATCH] everyday: replace 'prune' with 'gc --prune'

This document is for newcomers, so it's good to mention gc for housekeeping tasks instead of running prune manually.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 Documentation/everyday.txt |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
Show changes to Documentation/everyday.txt +3 −5
diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index ce7c170..a09c1d9 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-prune[1] to remove unused objects in the repository.
-
   * gitlink:git-repack[1] to pack loose objects for efficiency.
 
   * gitlink:git-gc[1] to do common housekeeping tasks such as
@@ -56,13 +54,13 @@ 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`.  This runs `repack -a -d`.
+such as `prune` and `repack`.
 
 Repack a small project into single pack.::
 +
 ------------
 $ git repack -a -d <1>
-$ git prune
+$ git gc --prune
 ------------
 +
 <1> pack all the objects reachable from the refs into one pack,
@@ -189,7 +187,7 @@ $ git pull <3>
 $ git log -p ORIG_HEAD.. arch/i386 include/asm-i386 <4>
 $ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <5>
 $ git reset --hard ORIG_HEAD <6>
-$ git prune <7>
+$ git gc --prune <7>
 $ git fetch --tags <8>
 ------------
 +
-- 
1.5.4.rc0.67.gf9c5-dirty
Miklos Vajna· Dec 20, 2007, 14:05 UTC · re: Miklos Vajna · lore
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(-)
Show changes to Documentation/everyday.txt +4 −9
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

← back to recent threads