Vscode: Add staging hunks in Git

Created on 14 Oct 2016  路  9Comments  路  Source: microsoft/vscode

SourceTree has this feature, would be great if VS Code had it also.

Most helpful comment

Changes view > click on elipses on top > stage selected ranges

screen shot 2016-10-14 at 11 05 48

All 9 comments

Changes view > click on elipses on top > stage selected ranges

screen shot 2016-10-14 at 11 05 48

@isidorn Is it working on version 1.11.11 (Windows)?

I think this disappeared in latest version, at least I dont see it on windows

@Kamahl19 yes. It is now possible to do this via the command palette (F1)

@isidorn How can I do this? I've tried to add only the selected lines typing 'stage' on the command palette, but I received these options. Am I doing something wrong?

screenshot 2017-04-24 11 30 38

Make sure you have the latest vscode version installed
screen shot 2017-04-24 at 16 53 46

Ah, I got it. Indeed, the vscode I have installed on my machine has the 'Stage Selected Ranges' option, in the first screenshot it is there, hehe. (I figured it out now). But I can only stage the entire hunk not a few lines, as the package Magit in the Emacs editor allows me to do. It will be nice if vscode could do that. Thanks for your help and time @isidorn.

@Matheus-de-Souza the issue you are explaining now is captured in another issue (you can search for it) and it will be fixed in a couple of days

Wish this was easier, like in SourceTree. I have to select the lines, right click, choose "Command Palette" at the bottom of the menu, then click the first item (Git: Stage Selected Ranges) in the command selection (if it was the last thing you did). How about just highlight, right click and choose "Git: Stage Selected Ranges" (i.e. put that command on the context menu). Even that isn't as good as SourceTree, but better.

Was this page helpful?
0 / 5 - 0 ratings