How I Finally Fixed My .gitignore (and Ended Up Writing an Extension)

Published: (December 3, 2025 at 09:40 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

Cover image for How I Finally Fixed My .gitignore (and Ended Up Writing an Extension)

I thought my .gitignore files were fine. Most of us probably do. You drop in a template, add a couple of custom patterns and believe everything is fine.

Except it often is not.

Typos slip in. Old entries linger. Some lines silently match nothing at all. Others match far more than you expect. I only realised this when I accidentally uploaded a file that should never have been in the repo. Unpicking it from multiple commits was a nightmare and it sent me down a rabbit hole.

To understand what was going on, I needed a quick way to see which patterns were actually matching something in my workspace—the real numbers.

That’s how IgnoreLens was born.

What IgnoreLens Does

IgnoreLens gives you a live insight into your .ignore files. It shows:

  • How many files each ignore line matches
  • Which patterns match zero files
  • Places where you may have typos or dead entries

It simply shines a light on the reality of your ignore rules so you can tidy them up with confidence.

Try It Out (VS Code)

Marketplace:
https://marketplace.visualstudio.com/items?itemName=ignore-lens.ignore-lens

OpenVSX:
https://open-vsx.org/extension/ignore-lens/ignore-lens

It is my first VS Code extension, so if you have thoughts, feedback, or ideas, I would love to hear them.

Back to Blog

Related posts

Read more »