1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
\r
4 <article lang="en" id="git-clean(1)">
\r
6 <title>git-clean(1)</title>
\r
8 <primary>git-clean(1)</primary>
\r
11 <simplesect id="_name">
\r
13 <simpara>git-clean - Remove untracked files from the working tree</simpara>
\r
15 <simplesect id="_synopsis">
\r
16 <title>SYNOPSIS</title>
\r
18 <literallayout><emphasis>git clean</emphasis> [-d] [-f] [-n] [-q] [-x | -X] [--] <path>…</literallayout>
\r
21 <simplesect id="_description">
\r
22 <title>DESCRIPTION</title>
\r
23 <simpara>Removes files unknown to git. This allows to clean the working tree
\r
24 from files that are not under version control. If the <emphasis>-x</emphasis> option is
\r
25 specified, ignored files are also removed, allowing to remove all
\r
27 If any optional <literal><path>…</literal> arguments are given, only those paths
\r
28 are affected.</simpara>
\r
30 <simplesect id="_options">
\r
31 <title>OPTIONS</title>
\r
39 Remove untracked directories in addition to untracked files.
\r
49 If the git configuration specifies clean.requireForce as true,
\r
50 <emphasis>git-clean</emphasis> will refuse to run unless given -f or -n.
\r
63 Don’t actually remove anything, just show what would be done.
\r
76 Be quiet, only report errors, but not the files that are
\r
77 successfully removed.
\r
87 Don’t use the ignore rules. This allows removing all untracked
\r
88 files, including build products. This can be used (possibly in
\r
89 conjunction with <emphasis>git-reset</emphasis>) to create a pristine
\r
90 working directory to test a clean build.
\r
100 Remove only files ignored by git. This may be useful to rebuild
\r
101 everything from scratch, but keep manually created files.
\r
107 <simplesect id="_author">
\r
108 <title>Author</title>
\r
109 <simpara>Written by Pavel Roskin <<ulink url="mailto:proski@gnu.org">proski@gnu.org</ulink>></simpara>
\r
111 <simplesect id="_git">
\r
113 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
\r