Git stage parts of a file in VS Code
2019-09-23
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 Tree
view of that file - Select the lines you want to stage and click the right mouse button
- Click
Stage Selected Ranges
Additionally, you can also unstage or revert the selected changes.