With VS Code, you can interactively select which parts of a file should be staged:
- Make changes to a file that is managed with git
- Go to the
Working Treeview of that file
- Select the lines you want to stage and click the right mouse button
Stage Selected Ranges
Additionally, you can also unstage or revert the selected changes.