Skip to content

Commit

Permalink
Documentation: point git-prune users to git-gc
Browse files Browse the repository at this point in the history
Most users should be using git-gc instead of directly
calling prune. For those who really do want more information
on pruning, let's point them at git-fsck, which goes into
slightly more detail on reachability.

And since we're pointing users there, let's make sure
reflogs are mentioned in git-fsck(1).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Apr 30, 2008
1 parent 302cc11 commit 8d308b3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Documentation/git-fsck.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ OPTIONS
An object to treat as the head of an unreachability trace.
+
If no objects are given, git-fsck defaults to using the
index file and all SHA1 references in .git/refs/* as heads.
index file, all SHA1 references in .git/refs/*, and all reflogs (unless
--no-reflogs is given) as heads.

--unreachable::
Print out objects that exist but that aren't readable from any
Expand Down
20 changes: 20 additions & 0 deletions Documentation/git-prune.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ SYNOPSIS
DESCRIPTION
-----------

NOTE: In most cases, users should run linkgit:git-gc[1], which calls
git-prune. See the section "NOTES", below.

This runs `git-fsck --unreachable` using all the refs
available in `$GIT_DIR/refs`, optionally with additional set of
objects specified on the command line, and prunes all
Expand Down Expand Up @@ -50,6 +53,23 @@ borrows from your repository via its
$ git prune $(cd ../another && $(git-rev-parse --all))
------------

Notes
-----

In most cases, users will not need to call git-prune directly, but
should instead call linkgit:git-gc[1], which handles pruning along with
many other housekeeping tasks.

For a description of which objects are considered for pruning, see
git-fsck's --unreachable option.

See Also
--------

linkgit:git-fsck[1],
linkgit:git-gc[1],
linkgit:git-reflog[1]

Author
------
Written by Linus Torvalds <torvalds@osdl.org>
Expand Down

0 comments on commit 8d308b3

Please sign in to comment.