Include details about the matching pattern for each path

git check-ignore

  • Analyze and debug Git ignore / exclude (".gitignore") files.
    More information: <https://git-scm.com/docs/git-check-ignore>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

git check-ignore --verbose {{path/to/files_or_directories}}

click the source code to copy install git check-ignore on any operating system with command-not-found.com