Search code examples
gitgitignore

Git ignoring files using global ignore file not working


I created file .gitignore_global in my home directory and then run the command:

git config --global core.excludefiles ~/.gitignore_global

Then I added pattern *.tmp in file ~/.gitignore_global to exclude file with .tmp extension but file is not excluded as:

But, adding pattern locally i.e local ignore is working.

What is wrong here?


Solution

  • The config option is core.excludesfile, not core.excludefiles.