blob: 0b44f3015d1ce8c600eb274a0f74c53868949658 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-prune(1)
2============
3
4NAME
5----
6git-prune - Prunes all unreachable objects from the object database
7
8
9SYNOPSIS
10--------
Junio C Hamanof65d9282007-01-22 09:00:1311'git-prune' [-n] [--] [<head>...]
Junio C Hamano1a4e8412005-12-27 08:17:2312
13DESCRIPTION
14-----------
15
Junio C Hamano7ad22dc2007-01-29 02:55:4816This runs `git-fsck --unreachable` using all the refs
Junio C Hamano1a4e8412005-12-27 08:17:2317available in `$GIT_DIR/refs`, optionally with additional set of
18objects specified on the command line, and prunes all
19objects unreachable from any of these head objects from the object database.
20In addition, it
21prunes the unpacked objects that are also found in packs by
22running `git prune-packed`.
23
24OPTIONS
25-------
26
27-n::
28Do not remove anything; just report what it would
29remove.
30
Junio C Hamano1bb569e2006-05-05 23:14:2531\--::
Junio C Hamano1a4e8412005-12-27 08:17:2332Do not interpret any more arguments as options.
33
34<head>...::
35In addition to objects
36reachable from any of our references, keep objects
37reachable from listed <head>s.
38
39EXAMPLE
40-------
41
42To prune objects not used by your repository nor another that
43borrows from your repository via its
44`.git/objects/info/alternates`:
45
46------------
47$ git prune $(cd ../another && $(git-rev-parse --all))
48------------
Junio C Hamano1a4e8412005-12-27 08:17:2349
50Author
51------
52Written by Linus Torvalds <torvalds@osdl.org>
53
54Documentation
55--------------
56Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
57
58GIT
59---
60Part of the gitlink:git[7] suite
61