Task 07 - Install Git
Introduction
Git is a distributed version control system designed to track changes in source code during software development. GitHub is a web-based platform that uses Git, the popular version control system, to help developers manage and collaborate on code projects. You’ll use Git commands to clone GitHub repositories for this lab and perform other related actions.
Description
In this task, you’ll ensure that Git is installed and install Git if needed.
The key steps are as follows:
- Run a command to determine whether Git is installed.
- Install Git if necessary.
- Verify that Git is correctly installed.
Success Criteria
- You’ve successfully installed Git.
Learning Resources
Solution
Expand this section to view the solution
-
Enter the following command at the Visual Studio Code Terminal window prompt and then select Enter. This command returns the Git version if Git is installed.
git --version
If Git is installed, skip the remaining steps in this task and move to the next task. Otherwise, complete the following steps to install Git.
-
Open a web browser and go to Git Downloads. Select Download for Windows.
-
On the Download for Windows page, select Click here to download. The installer should start downloading immediately.
-
When the download completes, select Open file.
-
If a User Account Control dialog displays, select Yes.
-
In the Git Setup dialog, select Install. Wait while Git installs.
-
In the Git Setup dialog, select Finish.
-
Return to Visual Studio Code. Enter the following command at the Terminal window prompt and then select Enter. Verify that the command returns the Git version.
git --version
-
Leave Visual Studio Code open. You’ll use the tool again in the next task.