Setting up Git
After this setup, users should have a functional git with an attached username and email.
Table of contents
Windows Setup
Download the 64-bit version of the Git Windows setup using the following link: https://git-scm.com/download/win
Note: If you’re using a 10-year-old system or older, consider using the 32-bit Windows Setup. The 64-bit version may not be compatible with your system.
Open the installer and accept all the defaults except for the default editor “Vim”. Vim is hard to use and not recommended for beginners. I’d recommend selecting Notepad++.
Note: If you don’t have Notepad++ already, download it with the prompt from the installer and install it with default settings.
Once Notepad++ is done installing, press “Back” on the Git installer and “Next” again to refresh the option to continue.
Once the installer is finished, launch git by right-clicking on an empty space on your desktop or window and selecting “Git Bash here”
In the console, type the following to edit your name and email:
Username: $ git config --global user.name "Adam Savage" (replace Adam Savage with your name) Email: $ git config --global user.email "adam@hotmail.ca" (replace adam@hotmail.ca with your email)
Verify your information by type the following:
$ git config --list
and look at the user.name and user.email field to double-check that they’ve been set properly.
Mac (OSX) Setup
Press Command-space to launch Spotlight and type “Terminal” then double click the search result.
In the terminal, type the following to install Git:
$ brew install git
Once the operation is complete, type the following to verify the installation.
$ git version
In the console, type the following to edit your name and email:
Username: $ git config --global user.name "Adam Savage" (replace Adam Savage with your name) Email: $ git config --global user.email "adam@hotmail.ca" (replace adam@hotmail.ca with your email)
Verify your information by typing the following:
$ git config --list
and look at the user.name and user.email field to double-check that they’ve been set properly.
Conclusion
By the end of this section, you will have successfully learned the following:
- How to install Git on a Windows or a Mac.
- How to set up your identifying information on Git.
- How to confirm that your information is correct.