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