git check-ignore

Analyze and debug Git ignore/exclude (".gitignore") files. More information: https://git-scm.com/docs/git-check-ignore.

git check-ignore {{path/to/file_or_directory}}

git check-ignore {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}

git check-ignore --stdin < {{path/to/file_list}}

git check-ignore --no-index {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}

git check-ignore --verbose {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}