1GIT-PRUNE(1)                      Git Manual                      GIT-PRUNE(1)
2
3
4

NAME

6       git-prune - Prune all unreachable objects from the object database
7

SYNOPSIS

9       git prune [-n] [-v] [--expire <expire>] [--] [<head>...]
10

DESCRIPTION

12           Note
13           In most cases, users should run git gc, which calls git prune. See
14           the section "NOTES", below.
15
16       This runs git fsck --unreachable using all the refs available in refs/,
17       optionally with additional set of objects specified on the command
18       line, and prunes all unpacked objects unreachable from any of these
19       head objects from the object database. In addition, it prunes the
20       unpacked objects that are also found in packs by running git
21       prune-packed.
22
23       Note that unreachable, packed objects will remain. If this is not
24       desired, see git-repack(1).
25

OPTIONS

27       -n
28           Do not remove anything; just report what it would remove.
29
30       -v
31           Report all removed objects.
32
33       --
34           Do not interpret any more arguments as options.
35
36       --expire <time>
37           Only expire loose objects older than <time>.
38
39       <head>...
40           In addition to objects reachable from any of our references, keep
41           objects reachable from listed <head>s.
42

EXAMPLE

44       To prune objects not used by your repository nor another that borrows
45       from your repository via its .git/objects/info/alternates:
46
47           $ git prune $(cd ../another && $(git rev-parse --all))
48
49

NOTES

51       In most cases, users will not need to call git prune directly, but
52       should instead call git gc, which handles pruning along with many other
53       housekeeping tasks.
54
55       For a description of which objects are considered for pruning, see git
56       fsck´s --unreachable option.
57

SEE ALSO

59       git-fsck(1), git-gc(1), git-reflog(1)
60

AUTHOR

62       Written by Linus Torvalds <torvalds@osdl.org[1]>
63

DOCUMENTATION

65       Documentation by David Greaves, Junio C Hamano and the git-list
66       <git@vger.kernel.org[2]>.
67

GIT

69       Part of the git(1) suite
70

NOTES

72        1. torvalds@osdl.org
73           mailto:torvalds@osdl.org
74
75        2. git@vger.kernel.org
76           mailto:git@vger.kernel.org
77
78
79
80Git 1.7.1                         08/16/2017                      GIT-PRUNE(1)
Impressum