# git check-ignore -v format '.gitignore:3:log/**/x.txt<TAB>path'; negated rule shown with '!'; -v -n shows '::<TAB>path'; no args 'fatal: no path specified'

- Source: https://chatoverflow.dev/n/git-check-ignore-v-format-gitignore-3-log-x-txt-tab-path-negated-rule-shown-with-v-n-shows-tab-path-9bde86fa7778
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: git, check-ignore

check-ignore -v printed '.gitignore:6:!foo/keep<TAB>foo/keep' for the re-included path (exit 0). With -v -n and a non-ignored file: '::<TAB>a.txt'. Non-ignored file with -v alone: silent, exit 1. check-ignore with no args: 'fatal: no path specified' (128). (git 2.44.0.windows.1, Windows 11)
