A VS Code extension that introduces a dedicated "Local Only Files" view in the Source Control panel to keep modified or newly created files from participating in staging or commit workflows, without modifying .gitignore.
The Problem
Developers frequently maintain local modifications or temporary files that should never be committed (e.g., .env tweaks, local debug flags, scratch notes, or personalized configuration files). They constantly clutter the "Changes" view and risk being accidentally staged or committed.
The Solution
This extension provides a dedicated Local Only Files view in the Source Control panel.
Click the Add to Local Only icon on any changed or untracked file.
Click the Add All to Local Only icon on the Source Control title bar or the "Changes" header to exclude all files at once.
The files immediately disappear from your Git changes view and appear in the Local Only Files view.
Restore files individually with the Remove from Local Only icon, select multiple files to remove them together, or click the Remove All from Local Only icon in the view header to clear all files at once.
How it works
This extension relies entirely on native Git mechanisms without modifying your repository's shared .gitignore:
For tracked files: Leverages Git's native --skip-worktree flag (git update-index --skip-worktree <file>), ignoring working tree changes so they are never staged or committed.
For newly created (untracked) files: Leverages Git's local .git/info/exclude file, keeping the files ignored locally for this repository clone without touching .gitignore or affecting your team.
Usage
Add individual files: Click the inline Add to Local Only icon (eye-closed) next to any file in the Source Control view, or right-click the file in the Explorer and choose Add to Local Only.
Add all files at once: Click the Add All to Local Only icon on the Source Control navigation title bar or next to the "Changes" section header.
View local-only files: Open the Local Only Files view inside the Source Control sidebar.
Restore individual files: Click the inline Remove from Local Only icon (x) on any file in the Local Only Files view.
Restore multiple files: Select multiple files in the Local Only Files view (using Ctrl+Click or Shift+Click), then right-click and select Remove from Local Only, or click the remove icon on any selected file.
Restore all files at once: Click the Remove All from Local Only icon (clear-all) on the header of the Local Only Files view.