]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-clean.txt
Documentation: rename gitlink macro to linkgit
[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]
2122591b 11'git-clean' [-d] [-f] [-n] [-q] [-x | -X] [--] <paths>...
c3b831bd
PR
12
13DESCRIPTION
14-----------
15Removes files unknown to git. This allows to clean the working tree
16from files that are not under version control. If the '-x' option is
17specified, ignored files are also removed, allowing to remove all
18build products.
393e3b19
JH
19When optional `<paths>...` arguments are given, the paths
20affected are further limited to those that match them.
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,
2122591b
JT
30 git-clean will refuse to run unless given -f or -n.
31
c3b831bd
PR
32-n::
33 Don't actually remove anything, just show what would be done.
34
35-q::
36 Be quiet, only report errors, but not the files that are
37 successfully removed.
38
39-x::
40 Don't use the ignore rules. This allows removing all untracked
41 files, including build products. This can be used (possibly in
5162e697 42 conjunction with linkgit:git-reset[1]) to create a pristine
c3b831bd
PR
43 working directory to test a clean build.
44
45-X::
46 Remove only files ignored by git. This may be useful to rebuild
47 everything from scratch, but keep manually created files.
48
49
50Author
51------
52Written by Pavel Roskin <proski@gnu.org>
53
54
55GIT
56---
5162e697 57Part of the linkgit:git[7] suite