Stage selected lines in a Git diff with fewer clicks.
Preview


Usage
- Open a Git diff in VS Code.
- Select the part of the changed text you want to stage.
- Wait briefly for the popup to appear.
- Click
Stage Selected Ranges.
The extension calls VS Code's built-in git.stageSelectedRanges command and leaves normal file selection behavior unchanged outside supported diff contexts.
Requirements
- VS Code
1.90.0or later - built-in Git extension enabled
- a diff context where
Stage Selected Rangesis actually available
Install
From VSIX
- Package the extension:
npm run package:vsix
- In VS Code, run
Extensions: Install from VSIX...
From Marketplace
Install from VS Code Marketplace
Notes
- The popup is anchored near the active end of the selection to reduce overlap with the start of the selection.
Development
- Open this folder in VS Code.
- Press
F5to launch an Extension Development Host. - In the new window, open a Git repository with modified files.
- Open a diff editor and test the selection flow.