You can download the program from the Git website for your operating system (Windows, MacOSX, or Linux/Unix).
To install Git directly from the command line, type the following into the terminal (if using Debian-based distributions like Ubuntu):
sudo apt-get install git-all
For MacOS, type:
and if Git is not already installed, the terminal will prompt you to install it.
Alternatively, if you have HomeBrew installed, you can install Git by typing:
brew install git
Create a Git username by entering the following into the terminal:
git config --global user.name "Jane Doe"
Your name goes in the quotation marks. The --global option means that this will configure your Git username for every repo on your computer. You can also only do this for a single repo.
You can confirm that you have entered your username correctly by typing:
git config --global user.name
which should return your name:
You can set your email address in Git as well, which is necessary if you plan on committing code to GitHub. Type the following into the terminal:
git config --global user.email "firstname.lastname@example.org"
Once again to confirm you have entered your email correctly:
git config --global user.email email@example.com