Documentation / git-prune.txton commit optimize verify-pack a bit (9909323)
   1git-prune(1)
   2============
   3
   4NAME
   5----
   6git-prune - Prune all unreachable objects from the object database
   7
   8
   9SYNOPSIS
  10--------
  11'git-prune' [-n] [--expire <expire>] [--] [<head>...]
  12
  13DESCRIPTION
  14-----------
  15
  16NOTE: In most cases, users should run linkgit:git-gc[1], which calls
  17git-prune. See the section "NOTES", below.
  18
  19This runs `git-fsck --unreachable` using all the refs
  20available in `$GIT_DIR/refs`, optionally with additional set of
  21objects specified on the command line, and prunes all unpacked
  22objects unreachable from any of these head objects from the object database.
  23In addition, it
  24prunes the unpacked objects that are also found in packs by
  25running `git prune-packed`.
  26
  27Note that unreachable, packed objects will remain.  If this is
  28not desired, see linkgit:git-repack[1].
  29
  30OPTIONS
  31-------
  32
  33-n::
  34        Do not remove anything; just report what it would
  35        remove.
  36
  37\--::
  38        Do not interpret any more arguments as options.
  39
  40--expire <time>::
  41        Only expire loose objects older than <time>.
  42
  43<head>...::
  44        In addition to objects
  45        reachable from any of our references, keep objects
  46        reachable from listed <head>s.
  47
  48EXAMPLE
  49-------
  50
  51To prune objects not used by your repository nor another that
  52borrows from your repository via its
  53`.git/objects/info/alternates`:
  54
  55------------
  56$ git prune $(cd ../another && $(git-rev-parse --all))
  57------------
  58
  59Notes
  60-----
  61
  62In most cases, users will not need to call git-prune directly, but
  63should instead call linkgit:git-gc[1], which handles pruning along with
  64many other housekeeping tasks.
  65
  66For a description of which objects are considered for pruning, see
  67git-fsck's --unreachable option.
  68
  69SEE ALSO
  70--------
  71
  72linkgit:git-fsck[1],
  73linkgit:git-gc[1],
  74linkgit:git-reflog[1]
  75
  76Author
  77------
  78Written by Linus Torvalds <torvalds@osdl.org>
  79
  80Documentation
  81--------------
  82Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
  83
  84GIT
  85---
  86Part of the linkgit:git[1] suite