shin
shin

Reputation: 32721

How not to ignore an item locally which is in .gitignore_global

I have *.log in .gitignore_global but I want to add it locally.

How can I achieve this?

Upvotes: 2

Views: 251

Answers (1)

John Feminella
John Feminella

Reputation: 311735

Patterns prefixed with a "!" will match again, so you can add this in your local .gitignore:

!*.log

From the gitignore docs:

  • An optional prefix ! which negates the pattern; any matching file excluded by a previous pattern will become included again. If a negated pattern matches, this will override lower precedence patterns sources.

Upvotes: 4

Related Questions