0

I have switched over to Changes View and I can see the changed line in green with the old line in red.

Selected text

I only want to stage some of these for a commit so I've highlighted the lines in green that I want to stage but the Stage Selected Lines button in the dropdown ... menu remains greyed out.

Greyed out button

danielr
  • 130
  • 1
  • 8

1 Answers1

1

For some strange reason staging selected lines is working now after I used the console to do it with the git add -p file command. I'm not sure if a file needs to be commited and pushed as well, but VSCode seems to know how to do it now.

Perhaps it was waiting for the command to be used at least once so that it could copy that operation?

I'm going to have to install git and vscode on another machine or VM and test this, unless someone else wants to do it. Will update once this strange behavior is confirmed.

danielr
  • 130
  • 1
  • 8
  • 1
    Thanks for the hint where to seek this option: after selecting the desired lines on the right (green) pane of the two-sided comparison view, then the contextual menu shows this option indeed. – Balu Ertl Apr 06 '19 at 16:40