4. Setting Up Git
Through this section, you’ll be checking your installation and configuring Git with your own name and information.
Check Your Installation
First, let’s make sure Git has been successfully installed. In your terminal, type the following command:
$ git --version
If you see a version number, you’re all set. If not, follow the installation instructions here.
Configuring Git on Your Computer
Our first step in working with Git is letting the software know who we are so it can track our work and attribute our contributions. This information is useful because it connects identifying information with the changes you make in your repository.
Type the following two commands into your command line, replacing the “John Doe” and “email@example.com” with your name and email (use quotations where you see them). These do not necessarily need to be the name and email you used to sign up for GitHub. Remember, these are different spaces and different softwares.
$ git config --global user.name "John Doe" $ git config --global user.email firstname.lastname@example.org
To check your set-up, type the following command into your terminal:
$ git config --list
You should get something that looks like this except with whatever information you entered previously:
user.name=Superstar Git User email@example.com
Challenges for lesson 4
What are you doing when you set up git? (Select one of the following)
What are you doing when you set up git?
What are you doing when you set up git?(Select one of the following)