]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-clean.txt
Documentation: git-clean: fix minor grammatical errors
[thirdparty/git.git] / Documentation / git-clean.txt
CommitLineData
c3b831bd
PR
1git-clean(1)
2============
3
4NAME
5----
6git-clean - Remove untracked files from the working tree
7
8SYNOPSIS
9--------
10[verse]
f448e24e 11'git clean' [-d] [-f] [-n] [-q] [-x | -X] [--] <path>...
c3b831bd
PR
12
13DESCRIPTION
14-----------
926337fe
WL
15Removes files unknown to git. This allows cleaning the working tree
16of files that are not under version control. If the '-x' option is
17specified, ignored files are also removed, allowing the removal of all
c3b831bd 18build products.
f448e24e
AMS
19If any optional `<path>...` arguments are given, only those paths
20are affected.
393e3b19 21
c3b831bd
PR
22
23OPTIONS
24-------
25-d::
26 Remove untracked directories in addition to untracked files.
27
2122591b 28-f::
0fc4baeb 29 If the git configuration specifies clean.requireForce as true,
ba020ef5 30 'git-clean' will refuse to run unless given -f or -n.
2122591b 31
c3b831bd 32-n::
459cf2e9 33--dry-run::
c3b831bd
PR
34 Don't actually remove anything, just show what would be done.
35
36-q::
459cf2e9 37--quiet::
c3b831bd
PR
38 Be quiet, only report errors, but not the files that are
39 successfully removed.
40
41-x::
42 Don't use the ignore rules. This allows removing all untracked
43 files, including build products. This can be used (possibly in
ba020ef5 44 conjunction with 'git-reset') to create a pristine
c3b831bd
PR
45 working directory to test a clean build.
46
47-X::
48 Remove only files ignored by git. This may be useful to rebuild
49 everything from scratch, but keep manually created files.
50
51
52Author
53------
54Written by Pavel Roskin <proski@gnu.org>
55
56
57GIT
58---
9e1f0a85 59Part of the linkgit:git[1] suite