Member-only story
9 Cool Git Things You Can Do Inside VS Code
Write and manage your code without ever leaving the editor

There is perhaps some wisdom in the saying “Don’t sh** where you eat.” Fortunately, no one ever said, “Don’t Git where you code” — and a good thing too. Since its launch in 2015, Visual Studio Code has taken the world by storm (no, not you WebStorm). Of its ever-growing repertoire of extensions and features, its integrated source control management — Git in particular — has to be one of the most useful.
And although I mainly rely on the command line when using Git, I’ve come to use more and more of VS Code’s Git features. There are many VS Code extensions that provide different Git functionalities. Here, I’ll be focusing on the editor’s built-in source control view and, to a lesser extent, the GitHub extension. Be sure to check out the resources at the end for a comprehensive list of features.
The source control view is the go-to spot for most Git-related tasks. Not only does it provide a live overview of changes in the workspace, but it will also show changes across multiple workspaces if files from more than one are open in the same editor window.
VS Code’s GitHub extension needs to be installed manually and allows for tasks such as cloning, publishing, merging, and managing PRs.
The following are some of the tasks I most commonly use them for along with their command-line interface equivalents. All of these actions are also available through the command palette (Ctrl+Shift+P
).
Stage and commit

CLI-equivalent: git add
→ git commit
View changes

CLI-equivalent: git diff -- <file-path>