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?
Asked
Active
Viewed 749 times
4

Lahiru Chandima
- 22,324
- 22
- 103
- 179
1 Answers
8
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.