]>
Commit | Line | Data |
---|---|---|
1 | git-clean(1) | |
2 | ============ | |
3 | ||
4 | NAME | |
5 | ---- | |
6 | git-clean - Remove untracked files from the working tree | |
7 | ||
8 | SYNOPSIS | |
9 | -------- | |
10 | [verse] | |
11 | 'git clean' [-d] [-f] [-n] [-q] [-x | -X] [--] <path>... | |
12 | ||
13 | DESCRIPTION | |
14 | ----------- | |
15 | Removes files unknown to git. This allows cleaning the working tree | |
16 | of files that are not under version control. If the '-x' option is | |
17 | specified, ignored files are also removed, allowing the removal of all | |
18 | build products. | |
19 | If any optional `<path>...` arguments are given, only those paths | |
20 | are affected. | |
21 | ||
22 | ||
23 | OPTIONS | |
24 | ------- | |
25 | -d:: | |
26 | Remove untracked directories in addition to untracked files. | |
27 | ||
28 | -f:: | |
29 | If the git configuration specifies clean.requireForce as true, | |
30 | 'git-clean' will refuse to run unless given -f or -n. | |
31 | ||
32 | -n:: | |
33 | --dry-run:: | |
34 | Don't actually remove anything, just show what would be done. | |
35 | ||
36 | -q:: | |
37 | --quiet:: | |
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 | |
44 | conjunction with 'git-reset') to create a pristine | |
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 | ||
52 | Author | |
53 | ------ | |
54 | Written by Pavel Roskin <proski@gnu.org> | |
55 | ||
56 | ||
57 | GIT | |
58 | --- | |
59 | Part of the linkgit:git[1] suite |