table of contents
other versions
- wheezy-backports 1:1.9.1-1~bpo70+2
- jessie 1:2.1.4-2.1+deb8u2
- jessie-backports 1:2.11.0-3~bpo8+1
- testing 1:2.11.0-3
- unstable 1:2.11.0-4
- experimental 1:2.13.1+next.20170610-1
GIT-CHECK-IGNORE(1) | Git Manual | GIT-CHECK-IGNORE(1) |
NAME¶
git-check-ignore - Debug gitignore / exclude filesSYNOPSIS¶
git check-ignore [options] pathname... git check-ignore [options] --stdin < <list-of-paths>
DESCRIPTION¶
For each pathname given via the command-line or from a file via --stdin, show the pattern from .gitignore (or other input files to the exclude mechanism) that decides if the pathname is excluded or included. Later patterns within a file take precedence over earlier ones.OPTIONS¶
-q, --quietDon’t output anything, just set exit
status. This is only valid with a single pathname.
-v, --verbose
Also output details about the matching pattern
(if any) for each given pathname.
--stdin
Read file names from stdin instead of from the
command-line.
-z
The output format is modified to be
machine-parseable (see below). If --stdin is also given, input paths are
separated with a NUL character instead of a linefeed character.
-n, --non-matching
Show given paths which don’t match any
pattern. This only makes sense when --verbose is enabled, otherwise it would
not be possible to distinguish between paths which match a pattern and those
which don’t.
--no-index
Don’t look in the index when undertaking
the checks. This can be used to debug why a path became tracked by e.g. git
add . and was not ignored by the rules as expected by the user or when
developing patterns including negation to match a path previously added with
git add -f.
OUTPUT¶
By default, any of the given pathnames which match an ignore pattern will be output, one per line. If no pattern matches a given path, nothing will be output for that path; this means that path will not be ignored.EXIT STATUS¶
0One or more of the provided paths is
ignored.
1
None of the provided paths are ignored.
128
A fatal error was encountered.
SEE ALSO¶
gitignore(5) gitconfig(5) git-ls-files(1)GIT¶
Part of the git(1) suite04/08/2014 | Git 1.9.1 |