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

[PATCH] Add commands that git-gc runs underneath

From
Jari Aalto <jari.aalto@cante.net>
Date
Aug 30, 2007, 09:35 UTC
Message-ID
<lkbtwek0.fsf@cante.net>

git-gc is a higher level utility to "do the right thing". However there are many other lower level utilities for the house keeping and it is not clear what git-gc actually does. Adding the actual lower level command and their parameters explain "what's going on".x

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 Documentation/git-gc.txt |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index c7742ca..c2315bf 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -21,6 +21,24 @@ Users are encouraged to run this task on a regular basis within
 each repository to maintain good disk space utilization and good
 operating performance.
 
+`git-gc` is a front-end to lower level house keeping commands and
+effectively runs these:
+
+--------------------------------
+ # for non-bare repositories only
+ git pack-refs --all --prune
+
+ git reflog expire --all
+
+ # with added --window -f parameters if --aggressive was specified
+ git repack -a -d -l
+
+ # if --prune was specified
+ git prune
+
+ git rerere gc
+--------------------------------
+
 OPTIONS
 -------
 
-- 
1.5.3.rc5



-- 
Welcome to FOSS revolution: we fix and modify until it shines
Next: Johannes Schindelin
Message 1 of 13 in “Add commands that git-gc runs underneath”
  1. Add commands that git-gc runs underneathJari Aalto, Aug 30, 2007
  2. Johannes SchindelinAug 30, 2007
  3. Andreas EricssonAug 30, 2007
  4. Johannes SchindelinAug 30, 2007
  5. Andreas EricssonAug 30, 2007
  6. Tom ClarkeAug 30, 2007
  7. Theodore TsoAug 30, 2007
  8. Junio C HamanoAug 30, 2007
  9. Andreas EricssonAug 31, 2007
  10. David KastrupAug 31, 2007
  11. Junio C HamanoAug 31, 2007
  12. David KastrupAug 31, 2007
  13. David KastrupAug 30, 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.