Stage Edit
Edit your staged changes right inside VS Code's staged diff.
When you click a file under Staged Changes, VS Code shows HEAD and the staged copy side by side, but both sides are read-only. Stage Edit makes the staged side editable. Save it, and the change goes into the git index and into your real file too. Cmd+click (Ctrl+click on Windows and Linux) Go to Definition still works.
A common use: you staged a file, then spot a leftover comment or debug line while reviewing. Delete it in the staged diff, save, and it is gone from both the commit and your file. No need to edit the file, then stage it again.

Install
- VS Code: search for "Stage Edit" in the Extensions view, or install it from the VS Code Marketplace.
- Cursor, Windsurf, VSCodium: install it from Open VSX.
How to use
- Stage a file (
git add, or the + button in Source Control).
- Click the file under Staged Changes. The diff opens with the title
<file> (HEAD ↔ Staged, editable).
- Edit the right side and save. The staged copy and your real file are both updated.
What happens in special cases
| Case |
What happens |
| Your real file has more unstaged edits in other places |
Your staged edit is applied to the real file too, and your unstaged edits are kept. |
| Your real file is open in a tab with unsaved edits |
The staged edit is merged into that tab, then the tab is saved. |
| Your unstaged edits touch the same lines as your staged edit |
The staged copy is saved, the real file is not edited, and you get a warning. |
| Git LFS file, symlink or submodule |
The diff stays read-only, with a short note in the status bar. |
| File with a merge conflict |
Nothing is read or written. You get a message to finish the merge first. |
Known limits
- Staged entries opened from the Timeline view are not editable yet.
- Cmd+click on a line you changed in the staged copy but have not saved finds nothing, because that line is not in the real file yet.
Development
npm ci
npm run compile # build once, or `npm run watch` while you work
npm run test:unit # git logic tests, against real temp git repos
npm test # unit tests, then tests inside a real VS Code
npm run package # build the .vsix
Press F5 in VS Code ("Run Extension") to try your changes in a new window.
Contributing
Issues and pull requests are welcome. Please add a test for any bug fix or new behaviour, and run npm test before you open a pull request.
License
MIT, see LICENSE.