Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is `git add` in Visual Studio Code?

Tags:

In Visual Studio Code, Cmd-Shift-P gives me the command palette. There are many Git commands listed in the palette, but the only result for "add" is "Add file to .gitignore". This is not what I want. I want the equivalent of git add $CURRENT_FILE. Such a command is provided, for example, by the git-plus extension to Atom. What is its equivalent in Visual Studio Code?

like image 651
jameshfisher Avatar asked Apr 14 '18 17:04

jameshfisher


People also ask

Is Git included in Visual Studio code?

Visual Studio Code has integrated source control management (SCM) and includes Git support out-of-the-box.

How do I view Git in Visual Studio?

The new Git experience is the default version control system in Visual Studio 2019 from version 16.8 onwards. However, if you want to turn it off, you can. Go to Tools > Options > Environment > Preview Features and then toggle the New Git user experience checkbox, which will switch you back to Team Explorer for Git.


Video Answer


1 Answers

I eventually found it: the command is called Git: Stage Changes. Visual Studio confusingly deviates from Git terminology here. There is a (sadly closed) GitHub issue regarding this problem.

like image 66
jameshfisher Avatar answered Oct 12 '22 01:10

jameshfisher