Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>ClickIgnoreNew to Visual Studio Code? Get it now.
ClickIgnore

ClickIgnore

Christian Sassi

|
1 install
| (0) | Free
Add files and folders to .gitignore straight from the explorer context menu
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
ClickIgnore logo

Stop hand-editing your .gitignore.

Right-click. Ignore. Done.

License: MIT VS Code 1.20+ Zero dependencies

You know the ritual: open .gitignore, work out the relative path, wonder whether the pattern needs a leading slash, save, run git status, discover the pattern matched half the repo. ClickIgnore replaces all of that with a single click and it knows the sharp edges of gitignore syntax so you don't have to.

✨ Features

Feature Details
🖱️ One click Right-click any file or folder and pick Add to .gitignore, in its own section at the bottom of the menu.
📄 Creates the file No .gitignore yet? One is created at the repository root.
🎯 Precise patterns Entries are anchored to the repo root (/src/secret.txt, /build/), so only the item you clicked gets ignored, not every file that shares its name.
🧹 Self-cleaning Ignoring a folder removes the entries inside it that just became redundant.
🛡️ Exclusion-safe Folders containing ! exclusions are rewritten so the excluded files stay tracked. Verified with git check-ignore.
🗂️ Multi-select Select several files and folders, add them all in one go.
🔍 Duplicate-proof Items already ignored (directly or through an ignored parent folder) are detected and skipped.
🙈 Context-aware The menu only shows up inside a git repository and never on a .gitignore itself.

🚀 Getting started

Works on any VS Code from 1.20 (January 2018) onward.

  1. Open a folder that belongs to a git repository.
  2. Right-click any file or folder in the explorer.
  3. Click Add to .gitignore.

A notification tells you exactly what was added, cleaned up, or skipped.

🧠 Smart folder handling

Redundant entries? Gone.

Once a folder is ignored, the entries inside it are dead weight. ClickIgnore removes them for you:

# before                        # after adding "build"
/build/temp.log                 /build/
/build/cache/

Exclusions? Protected.

Git cannot re-include a file when its parent directory is fully ignored: a naive /build/ entry would silently break your ! rules. ClickIgnore ignores the folder's contents instead and rebuilds the exclusion chain below the new rule, including the un-ignore steps that nested exclusions require:

# before                        # after adding "build"
!/build/a/keep.me               /build/*
                                !/build/a/
                                /build/a/*
                                !/build/a/keep.me

Everything in build/ is ignored, yet build/a/keep.me stays tracked. Exactly what you meant.

❓ FAQ

Does it untrack files git is already tracking? No. .gitignore only affects untracked files. Run git rm --cached <file> to untrack one.

What about global exclusions like !keep.me? Patterns that aren't anchored to a specific folder can't be attributed to it, so they are left untouched when you ignore a folder.

Any settings to configure? None. It just works.

🛠️ Development

No build step, no dependencies: clone, open, press F5.

git clone https://github.com/christiansassi/.clickignore

To package and install locally:

npm install -g @vscode/vsce
vsce package
code --install-extension click-ignore-0.0.1.vsix

📝 Release notes

0.0.1

Initial release:

  • Add files and folders to .gitignore from the explorer context menu
  • Redundant-entry cleanup when ignoring folders
  • Exclusion-preserving folder rules
  • Multi-select support

📜 License

Released under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft