Updated git_doc to git 1.8
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-clean.xml
blobc6fe8a15987ed08f0ade4af884b73b7cd6916018
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">\r
3 \r
4 <sect2 lang="en" id="git-clean(1)">\r
5     <title>git-clean(1)</title>\r
6 <indexterm>\r
7 <primary>git-clean(1)</primary>\r
8 </indexterm>\r
9 <simplesect id="git-clean(1)__name">\r
10 <title>NAME</title>\r
11 <simpara>git-clean - Remove untracked files from the working tree</simpara>\r
12 </simplesect>\r
13 <simplesect id="git-clean(1)__synopsis">\r
14 <title>SYNOPSIS</title>\r
15 <blockquote>\r
16 <literallayout><emphasis>git clean</emphasis> [-d] [-f] [-n] [-q] [-e &lt;pattern&gt;] [-x | -X] [--] &lt;path&gt;&#8230;</literallayout>\r
17 </blockquote>\r
18 </simplesect>\r
19 <simplesect id="git-clean(1)__description">\r
20 <title>DESCRIPTION</title>\r
21 <simpara>Cleans the working tree by recursively removing files that are not\r
22 under version control, starting from the current directory.</simpara>\r
23 <simpara>Normally, only files unknown to git are removed, but if the <emphasis>-x</emphasis>\r
24 option is specified, ignored files are also removed. This can, for\r
25 example, be useful to remove all build products.</simpara>\r
26 <simpara>If any optional <emphasis>&lt;path&gt;...</emphasis> arguments are given, only those paths\r
27 are affected.</simpara>\r
28 </simplesect>\r
29 <simplesect id="git-clean(1)__options">\r
30 <title>OPTIONS</title>\r
31 <variablelist>\r
32 <varlistentry>\r
33 <term>\r
34 -d\r
35 </term>\r
36 <listitem>\r
37 <simpara>\r
38         Remove untracked directories in addition to untracked files.\r
39         If an untracked directory is managed by a different git\r
40         repository, it is not removed by default.  Use -f option twice\r
41         if you really want to remove such a directory.\r
42 </simpara>\r
43 </listitem>\r
44 </varlistentry>\r
45 <varlistentry>\r
46 <term>\r
47 -f\r
48 </term>\r
49 <term>\r
50 --force\r
51 </term>\r
52 <listitem>\r
53 <simpara>\r
54         If the git configuration variable clean.requireForce is not set\r
55         to false, <emphasis>git clean</emphasis> will refuse to run unless given -f or -n.\r
56 </simpara>\r
57 </listitem>\r
58 </varlistentry>\r
59 <varlistentry>\r
60 <term>\r
61 -n\r
62 </term>\r
63 <term>\r
64 --dry-run\r
65 </term>\r
66 <listitem>\r
67 <simpara>\r
68         Don't actually remove anything, just show what would be done.\r
69 </simpara>\r
70 </listitem>\r
71 </varlistentry>\r
72 <varlistentry>\r
73 <term>\r
74 -q\r
75 </term>\r
76 <term>\r
77 --quiet\r
78 </term>\r
79 <listitem>\r
80 <simpara>\r
81         Be quiet, only report errors, but not the files that are\r
82         successfully removed.\r
83 </simpara>\r
84 </listitem>\r
85 </varlistentry>\r
86 <varlistentry>\r
87 <term>\r
88 -e &lt;pattern&gt;\r
89 </term>\r
90 <term>\r
91 --exclude=&lt;pattern&gt;\r
92 </term>\r
93 <listitem>\r
94 <simpara>\r
95         In addition to those found in .gitignore (per directory) and\r
96         $GIT_DIR/info/exclude, also consider these patterns to be in the\r
97         set of the ignore rules in effect.\r
98 </simpara>\r
99 </listitem>\r
100 </varlistentry>\r
101 <varlistentry>\r
102 <term>\r
103 -x\r
104 </term>\r
105 <listitem>\r
106 <simpara>\r
107         Don't use the standard ignore rules read from .gitignore (per\r
108         directory) and $GIT_DIR/info/exclude, but do still use the ignore\r
109         rules given with <emphasis>-e</emphasis> options.  This allows removing all untracked\r
110         files, including build products.  This can be used (possibly in\r
111         conjunction with <emphasis>git reset</emphasis>) to create a pristine\r
112         working directory to test a clean build.\r
113 </simpara>\r
114 </listitem>\r
115 </varlistentry>\r
116 <varlistentry>\r
117 <term>\r
118 -X\r
119 </term>\r
120 <listitem>\r
121 <simpara>\r
122         Remove only files ignored by git.  This may be useful to rebuild\r
123         everything from scratch, but keep manually created files.\r
124 </simpara>\r
125 </listitem>\r
126 </varlistentry>\r
127 </variablelist>\r
128 </simplesect>\r
129 <simplesect id="git-clean(1)__see_also">\r
130 <title>SEE ALSO</title>\r
131 <simpara><xref linkend="gitignore(5)" /></simpara>\r
132 </simplesect>\r
133 <simplesect id="git-clean(1)__git">\r
134 <title>GIT</title>\r
135 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
136 </simplesect>\r
137 </sect2>\r