'\" t .\" Title: git-prune .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 09/28/2018 .\" Manual: Git Manual .\" Source: Git 2.11.0 .\" Language: English .\" .TH "GIT\-PRUNE" "1" "09/28/2018" "Git 2\&.11\&.0" "Git Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" git-prune \- Prune all unreachable objects from the object database .SH "SYNOPSIS" .sp .nf \fIgit prune\fR [\-n] [\-v] [\-\-expire ] [\-\-] [\&...] .fi .sp .SH "DESCRIPTION" .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp In most cases, users should run \fIgit gc\fR, which calls \fIgit prune\fR\&. See the section "NOTES", below\&. .sp .5v .RE .sp This runs \fIgit fsck \-\-unreachable\fR using all the refs available in \fBrefs/\fR, optionally with additional set of objects specified on the command line, and prunes all unpacked objects unreachable from any of these head objects from the object database\&. In addition, it prunes the unpacked objects that are also found in packs by running \fIgit prune\-packed\fR\&. It also removes entries from \&.git/shallow that are not reachable by any ref\&. .sp Note that unreachable, packed objects will remain\&. If this is not desired, see \fBgit-repack\fR(1)\&. .SH "OPTIONS" .PP \-n, \-\-dry\-run .RS 4 Do not remove anything; just report what it would remove\&. .RE .PP \-v, \-\-verbose .RS 4 Report all removed objects\&. .RE .PP \-\- .RS 4 Do not interpret any more arguments as options\&. .RE .PP \-\-expire