man git-config
core.excludesFile
In addition to .gitignore (per-directory) and .git/info/exclude, Git looks into this file for patterns of files which are not meant to be tracked. "~/" is expanded to the
value of $HOME and "~user/" to the specified user’s home directory. Its default value is $XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either not set or empty,
$HOME/.config/git/ignore is used instead. See gitignore(5).
из чего, кстати, следует, что .gitignore к тому же учитывается в каждом каталоге проекта