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
11

DESCRIPTION

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

OPTIONS

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

EXAMPLE

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

NOTES

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

SEE ALSO

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

GIT

63       Part of the git(1) suite
64
65
66
67Git 1.8.3.1                       11/19/2018                      GIT-PRUNE(1)
Impressum