.\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .TH "GIT-CLEAN" 1 "" "" "" .SH NAME git-clean \- Remove untracked files from the working tree .SH "SYNOPSIS" .nf \fIgit\-clean\fR [\-d] [\-n] [\-q] [\-x | \-X] .fi .SH "DESCRIPTION" Removes files unknown to git\&. This allows to clean the working tree from files that are not under version control\&. If the \fI\-x\fR option is specified, ignored files are also removed, allowing to remove all build products\&. .SH "OPTIONS" .TP \-d Remove untracked directories in addition to untracked files\&. .TP \-n Don't actually remove anything, just show what would be done\&. .TP \-q Be quiet, only report errors, but not the files that are successfully removed\&. .TP \-x Don't use the ignore rules\&. This allows removing all untracked files, including build products\&. This can be used (possibly in conjunction with \fBgit\-reset\fR(1)) to create a pristine working directory to test a clean build\&. .TP \-X Remove only files ignored by git\&. This may be useful to rebuild everything from scratch, but keep manually created files\&. .SH "AUTHOR" Written by Pavel Roskin .SH "GIT" Part of the \fBgit\fR(7) suite