A VS Code extension that lists Git changed files (staged and/or unstaged) and lets you search and replace inside only those files, with results and navigation in a dedicated side bar.
Features
Activity bar icon — Click Git File Search in the left activity bar to open the Search view (same pattern as extensions like GitLens).
Fixed search / replace header — Scope (all / staged / unstaged), Search and Replace fields, regex / case / whole word, Search and Replace All stay at the top.
Scrollable changed-files list — All paths in scope are listed; click a row to open the file.
Matches section — After you run Search, match rows appear below the file list; click a match to jump to the line; per-row Replace and Replace All work as before.
Multi-root workspaces — Paths are workspace-relative; multiple repos are supported.
Finding the activity bar icon
If you do not see Git File Search on the activity bar, open the ⋯ (more) menu at the bottom of the bar and pin or select Git File Search, or use the Command Palette command below.
Commands
Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and type:
Command
Description
Git Search: Search in Changed Files
Picker for All / Staged / Unstaged, then opens the Git File Search side bar
Git Search: Search in All Changed Files
Opens side bar scoped to all changes
Git Search: Search in Staged Files Only
Opens side bar scoped to staged files
Git Search: Search in Unstaged Files Only
Opens side bar scoped to unstaged files
Git Search: Show Git Search in Side Bar
Focuses the Git File Search activity bar view
Git Search: Open Search in Changed Files (Editor Tab)
Opens the same UI in an editor tab instead
How it works
The extension uses the built-in vscode.git API for changed paths (no shell git).
The side bar webview loads the file list for the selected scope and runs text search by reading those files on disk.
Replace uses workspace edits; the file list and matches refresh after replacements.
Development
Prerequisites
Node.js (use the version in the project .nvmrc when packaging with vsce on older Node)
VS Code (v1.85+)
Setup
npm install
npm run compile
Running
Press F5 in VS Code to launch the Extension Development Host with the extension loaded.
Requirements
The workspace must be a Git repository (or contain Git repositories).
The built-in vscode.git extension must be enabled (it is by default).
License & privacy
Released under the MIT License; the full license text is included in the LICENSE file in this package. This extension does not collect telemetry or send data off your machine.