X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-clean.txt;h=79fb9841441d02cd635dcdd2aecef42d38c6b59d;hb=80809062452a65146d73ae483415acbc737fabf1;hp=be894af39ff6559affbf0617e4c5d8fe68c33fe8;hpb=77f143bf3e218857ec8e5244d7e862e8e0c1a041;p=git.git diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt index be894af39..79fb98414 100644 --- a/Documentation/git-clean.txt +++ b/Documentation/git-clean.txt @@ -8,7 +8,7 @@ git-clean - Remove untracked files from the working tree SYNOPSIS -------- [verse] -'git clean' [-d] [-f] [-n] [-q] [-x | -X] [--] ... +'git clean' [-d] [-f] [-n] [-q] [-e ] [-x | -X] [--] ... DESCRIPTION ----------- @@ -27,10 +27,14 @@ OPTIONS ------- -d:: Remove untracked directories in addition to untracked files. + If an untracked directory is managed by a different git + repository, it is not removed by default. Use -f option twice + if you really want to remove such a directory. -f:: - If the git configuration specifies clean.requireForce as true, - 'git-clean' will refuse to run unless given -f or -n. +--force:: + If the git configuration variable clean.requireForce is not set + to false, 'git clean' will refuse to run unless given -f or -n. -n:: --dry-run:: @@ -41,22 +45,24 @@ OPTIONS Be quiet, only report errors, but not the files that are successfully removed. +-e :: +--exclude=:: + In addition to those found in .gitignore (per directory) and + $GIT_DIR/info/exclude, also consider these patterns to be in the + set of the ignore rules in effect. + -x:: - Don't use the ignore rules. This allows removing all untracked + Don't use the standard ignore rules read from .gitignore (per + directory) and $GIT_DIR/info/exclude, but do still use the ignore + rules given with `-e` options. This allows removing all untracked files, including build products. This can be used (possibly in - conjunction with 'git-reset') to create a pristine + conjunction with 'git reset') to create a pristine working directory to test a clean build. -X:: Remove only files ignored by git. This may be useful to rebuild everything from scratch, but keep manually created files. - -Author ------- -Written by Pavel Roskin - - GIT --- Part of the linkgit:git[1] suite