1GIT-PRUNE(1) Git Manual GIT-PRUNE(1)
2
3
4
6 git-prune - Prune all unreachable objects from the object database
7
9 git-prune [-n] [--] [<head>...]
10
12 This runs git-fsck --unreachable using all the refs available in
13 $GIT_DIR/refs, optionally with additional set of objects specified on
14 the command line, and prunes all objects unreachable from any of these
15 head objects from the object database. In addition, it prunes the
16 unpacked objects that are also found in packs by running git
17 prune-packed.
18
20 -n
21 Do not remove anything; just report what it would remove.
22
23 --
24 Do not interpret any more arguments as options.
25
26 <head>...
27 In addition to objects reachable from any of our references, keep
28 objects reachable from listed <head>s.
29
31 To prune objects not used by your repository nor another that borrows
32 from your repository via its .git/objects/info/alternates:
33
34
35
36 $ git prune $(cd ../another && $(git-rev-parse --all))
37
38
40 Written by Linus Torvalds <torvalds@osdl.org>
41
43 Documentation by David Greaves, Junio C Hamano and the git-list
44 <git@vger.kernel.org>.
45
47 Part of the git(7) suite
48
49
50
51
52Git 1.5.3.3 10/09/2007 GIT-PRUNE(1)