git がすでにこれらのファイルを追跡している場合は、git rmそれらを追跡してから追加し直す必要があります。
グローバルまたはそのディレクトリ内の別の .gitignore が設定をオーバーライドしている可能性があります。優先順位については、man ページのエントリを参照してください。
order of precedence, from highest to lowest (within one level of precedence, the last matching pattern decides the outcome): Patterns read from the command line for those commands that support them.
o Patterns read from a .gitignore file in the same directory as the path, or in any
parent directory, with patterns in the higher level files (up to the toplevel of the
work tree) being overridden by those in lower level files down to the directory
containing the file. These patterns match relative to the location of the .gitignore
file. A project normally includes such .gitignore files in its repository, containing
patterns for files generated as part of the project build.
o Patterns read from $GIT_DIR/info/exclude.
o Patterns read from the file specified by the configuration variable core.excludesfile