Using Git with VS Code
Git is highly integrated in VS Code. The commands we explored a bit earlier in this chapter can all be executed from VS Code. To explore Git using VS Code, let's take the frontend project and explore the different Git functions from within VS Code.
Start by opening the frontend project folder and go to the Source Control tab by clicking on the following button:
Our project folder does not contain a .git
folder, which means that the first step is to initialize the repository. You can do this by either clicking the Initialize Repository button in the Source Control tab or by using the command palette and searching for Git: Initialize Repository
:
Clicking on Initialize Repository will run git init
for the current working directory.
Our project includes the node_modules
folder....