Visual Studio Code#
Visual Studio Code can use an existing Git installation to provide the corresponding functionalities.
Clone#

Source control icon#
If you have not yet opened a repository, you have the option of selecting
or in the view. If you select , you will be asked for the URL of the repository.Gutter indicators#
When you open a Git repository and start making changes, VS Code adds useful annotations:
a red triangle indicates where lines have been deleted
a green bar indicates newly added lines
a blue bar indicates lines that have been changed.
Commit#
git add
and git reset
can be selected either in the context menu of a
file or by drag & drop. After a git commit
, you can enter a commit message
and confirm with Ctrl ⏎ or ⌘ ⏎. If there are already changes in
the stage area, only these will be committed; otherwise you will be asked to
select changes. If necessary, you will receive more specific commit actions in
Note
If you have accidentally created your commit in the wrong branch, you can undo it with
in the (⇧ ⌘ P).The sorce control icon in the activity bar on the left shows you how many changes you have made in your repository. Selecting the icon will give you a more detailed overview of your changes. Selecting a single file will show you the line-by-line text changes. You can also use the editor on the right to make further changes.
Git status bar#

Status bar#
In the lower left corner you will see the status display with further indicators about the state of your repository:
the current branch with the possibility to switch to another branch
incoming and outgoing commits
the
action, which first executesgit pull
and thengit push
.