Home 〉 Other Tutorials 〉 Visual Studio Code Tutorials 〉Use Terminal and Git in Visual Studio Code | Built-in Tools Guide
Use Terminal and Git in Visual Studio Code | Built-in Tools Guide !
With VS Code's integrated terminal and Git support, you can run commands, manage repositories, and push to GitHub without leaving your editor. This improves productivity and keeps everything in one place.
Are you tired of switching between your code editor and terminal? Or confused about how to use Git without leaving VS Code? Good news: Visual Studio Code has a powerful built-in terminal and Git integration that simplifies your development workflow. Whether you're committing code, pushing to GitHub, or installing packages with npm — you can do it all without leaving the editor!
In this tutorial, you'll learn:
The integrated terminal lets you run shell commands directly inside VS Code.
You can open multiple terminals by clicking the + icon. You can also switch between Command Prompt, PowerShell, Git Bash, or Linux shell if installed.
VS Code comes with Git built in. If Git is installed on your system, VS Code will detect it automatically. Learn more about Git
To work with remote repositories like GitHub:
git remote add origin https://github.com/your-username/your-repo.git
git push -u origin main
Or use the GUI: Click the … menu > Push.
git pull origin main
VS Code shows all Git status indicators like changes, conflicts, or staging — making version control visual and easy.
For enhanced Git features in VS Code, install GitLens from the Extensions Marketplace. It offers:
Install it by going to Extensions (Ctrl + Shift + X) and searching for GitLens.
You can switch between shells by clicking the dropdown in the terminal tab or changing it via Terminal > Select Default Profile.
Yes. VS Code requires Git to be installed on your machine. Download Git here.
Yes! VS Code provides a visual interface to resolve merge conflicts, with inline and side-by-side options.