A VS Code extension that adds a convenient "Stage Selected" option to the editor context menu, allowing you to stage only selected portions of your files to Git.
- Context Menu Integration: Right-click on selected text to see the "Stage Selected" option
- Granular Git Control: Stage only the specific lines you want, not the entire file
- Seamless Workflow: Works with your existing Git workflow in VS Code
- Select the text you want to stage in any file
- Right-click to open the context menu
- Click "Stage Selected" to stage only your selected text
- Continue with your normal Git workflow (commit, push, etc.)
- VS Code 1.79.0 or higher
- Git repository initialized in your workspace
- VS Code's built-in Git extension enabled
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Stage Selected"
- Click Install
- Download the
.vsixfile from the releases - Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Click the "..." menu and select "Install from VSIX..."
- Select the downloaded file
# Clone the repository
git clone https://github.com/camchambers/stage-selected.git
cd stage-selected
# Install dependencies
npm install
# Compile the extension
npm run compile
# Run tests
npm test# Package into VSIX file
npm run packageContributions are welcome! Please feel free to submit a Pull Request.
This extension is licensed under the MIT License. See LICENSE.txt for details.
If you encounter any issues or have feature requests, please file them in the GitHub Issues section.
Enjoy staging your selected code! 🚀
