danielr
danielr

Reputation: 130

VSCode Stage Selected Lines is greyed out with changes highlighted

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

Upvotes: 0

Views: 1842

Answers (1)

danielr
danielr

Reputation: 130

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.

Upvotes: 1

Related Questions