1GIT-CLEAN(1)                      Git Manual                      GIT-CLEAN(1)
2
3
4

NAME

6       git-clean - Remove untracked files from the working tree
7

SYNOPSIS

9       git clean [-d] [-f] [-n] [-q] [-x | -X] [--] <path>...
10
11

DESCRIPTION

13       Cleans the working tree by recursively removing files that are not
14       under version control, starting from the current directory.
15
16       Normally, only files unknown to git are removed, but if the -x option
17       is specified, ignored files are also removed. This can, for example, be
18       useful to remove all build products.
19
20       If any optional <path>... arguments are given, only those paths are
21       affected.
22

OPTIONS

24       -d
25           Remove untracked directories in addition to untracked files. If an
26           untracked directory is managed by a different git repository, it is
27           not removed by default. Use -f option twice if you really want to
28           remove such a directory.
29
30       -f, --force
31           If the git configuration variable clean.requireForce is not set to
32           false, git clean will refuse to run unless given -f or -n.
33
34       -n, --dry-run
35           Don’t actually remove anything, just show what would be done.
36
37       -q, --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 working directory
45           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

AUTHOR

52       Written by Pavel Roskin <proski@gnu.org[1]>
53

GIT

55       Part of the git(1) suite
56

NOTES

58        1. proski@gnu.org
59           mailto:proski@gnu.org
60
61
62
63Git 1.7.1                         08/16/2017                      GIT-CLEAN(1)
Impressum