Bring your workflows closer to your code. Learn how Visual Studio Code and GitHub are better together.
Download Visual Studio Code
Free for Windows, macOS, and Linux
Check out our 20-minute tutorial to get the best of GitHub in the editor.
No editor, no problem. Code in a browser with a real VS Code experience, powered by GitHub Codespaces.
You can directly clone a repo from Visual Studio Code. Authenticate with your GitHub account and clone any repo you want. VS Code takes care of setting your remote so you can clone, code and push in no time flat.
Publish any project directly to GitHub without having to create a repo first. VS Code will create the repo for you and give you control over whether or not it should be public or private.
The source control view tracks your file changes and makes it easy to commit and push those changes. Add a commit message, mention another user in the repo, and click on 'sync changes' in the status bar. This will pull any remote changes down, and push your commits upstream.
From the status bar, you can view all branches and easily switch to another one. From the command palette, you can also checkout another branch, create a new one, or rename a branch. Branch away!
Temporarily set aside the code changes you already made with a Git stash then get back to them later!
The Source Control view in VS Code lets you stage specific changes only, so you can control what's part of your commit and what's still a WIP (Work In Progress) Then click on ✔️ to make a commit.
Do you most commonly merge, squash/merge, or rebase/merge? Well, from the GitHub Pull Request and Issues extension, you can choose either merge option.
VS Code will recognize merge conflicts, highlight the differences, and make it easy to choose the current change or the incoming change. If you have multiple changes, you can search for 'Merge Conflict' in the command palette and take action on all conflicts.
Some people prefer a to see their diff's side-by-side and some prefer an inline view. Get both in VS Code. This setting persists when it's changed so you can set it and forget it.
Sometimes you're just knee deep in source code and need to switch over to GitHub. With the GitHub Pull Requests and Issues extension, you can copy a permalink or directly open a permalink in GitHub so you don't lose your place.
Do you find yourself putting //TODO comments throughout your code and then forgetting to...do them? With the GitHub Pull Requests and Issues extension, you can make those comments actionable and create GH issues directly from code comments.
View issues from GitHub directly from VS Code. Create custom queries using the same GitHub filter syntax you already know. Your issues organized your way.
You can request a review on your PR right from VS Code using the GitHub Pull Requests and Issues extension. Open the PR from the Github Pull Requests explorer and assign away.
Choose the categories you see in the GitHub Pull Requests and Issues tree view. Customize it and make sure you never lose track of PRs again.
View PRs. Check out branches. Add comments. Merge and delete branches from the editor.
You can see the Git commit history of a specific file in the Timeline view. Choosing a commit opens up the diff view of the changes from that commit. Easily copy the commit Id or commit message to help you go to important points in your code's
Get in-line blame annotations and hover information for recent commits, search through commits, visualize and compare commits across branches, and so much more. GitLens is a must-have extension if you're using version control in VS Code.
Use the integrated terminal in VS Code for advanced actions like GPG signing your commits so you can get that big green "verified" badge.
Curious to see the Git commands VS Code is doing? You can always peek under the hood. The full output of what VS Code is doing with Git is always available for you in case you need it.