Text of code.visualstudio.com › docs › introvideos › versioncontrol as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Version control in VS Code

AI agents: See llms.txt for documentation discovery and navigation. Documentation articles are also available as Markdown by appending .md to the article URL. Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. Version control in VS Code View as Markdown Ask in VS Code Ask in VS Code Insiders In this tutorial, we will learn how to use the basics of Git version control in Visual Studio Code.

For more information about integrated Git support, including how to work with remote repositories, read on in the related resources section below. Here's the next video we recommend: Customize Pick another video from the list: Introductory Videos Video outline Install Git https://git-scm.com Open Folder File > Open Folder ( Ctrl+K Ctrl+O ) Source Control View > Source Control (SCM) ( ⌃⇧G (Windows, Linux Ctrl+Shift+G ) ) Initialize repository main is the default branch Open the Command Palette.

View > Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P ) ) Rename a branch Git: Rename Branch File version control status U - Untracked file A - Added file M - Modified file Commit file Commit ☑️(check mark) button Create a branch Git: Create Branch Diff editor Select More Actions ( ... ) > Diff View in the diff editor toolbar, then choose Inline , Side by Side , or Automatic . See Choose a diff layout for details.

Stage changes Stage Changes ➕ button Switch branches Status bar branch item (lower left) Merge branch Views and More Actions ( ... ) > Branch > Merge Branch Publish branch to GitHub Clone repository Git: Clone > Clone from URL Next video Customize - Customize VS Code with settings and keyboard shortcuts. Introductory Videos - Review the entire list of videos. Related resources Source Control - Read more about integrated Git support.

Working with GitHub - Create and manage GitHub issues and pull requests. Setup Overview - Set up and start using VS Code. 5/31/2022