Source Control

Source Control, Overview

Git is built in. Stage, commit, branch, and sort out conflicts from the Source Control view.

The Source Control view

Open it from the Activity Bar (the branching icon, or Ctrl+Shift+G). It lists changed, staged, and untracked files, grouped so you can see what is what. Select a file to see its diff.

What is included

1

Change tracking

Modified, added, deleted, and untracked files show up as soon as you open a Git repository. There is no setup step.

2

Inline gutter indicators

Colored bars in the editor gutter mark added, modified, and deleted lines against your last commit. Hover one to see the original text.

3

Commit graph

A history graph shows recent commits, branches, and where HEAD sits. From there you can check out, cherry-pick, or compare a commit.

4

Multi-repository awareness

In a multi-root workspace, each folder's Git repository is tracked on its own, and they all show in the same Source Control view.

Working without the mouse

Everything in Source Control has a Command Palette command, such as Git: Commit, Git: Create Branch, and Git: Pull. You can do the whole flow from the keyboard.

Extending it

Built-in Git covers local repositories and GitHub remotes. For other hosts (GitLab, Bitbucket, self-hosted Gitea) or extras such as blame annotations, install the matching extension from Open VSX. The Source Control view is a place extensions can add to.