3

I have a global .gitignore file at my home directory. For a certain repository, I want one ignore pattern specified in my global .gitignore to be ignored because files with that pattern are necessary to be tracked in this repository. Is this possible?

Lahiru Chandima
  • 19,524
  • 18
  • 91
  • 154

1 Answers1

6

In your local repository add a .gitignore file that negates the rule from your global .gitignore.

For example:

global .gitignore

*.foo

repos .gitignore

!*.foo

You are basically doing the same thing as this question. Just in two different files.

Community
  • 1
  • 1
Schleis
  • 37,924
  • 7
  • 65
  • 84