How to Set up Git in 3 Steps
Set up Git on ANY Debian-based Linux Distro
- Download Git by running the following command on your terminal:
$ sudo apt-get install git
To confirm whether your download was successful, run:
$ git --version
Here's the output I got on my PC:
- Set your username for every repository on your computer, run:
$ git config --global user.name "Your-GitHub_userName"
To confirm that you have set the Git username correctly, run:
$ git config --global user.name Your-GitHub_userName
On my PC, the result was:
- Set your commit email address. This is the email address that'll be used to author commits in every repository on your computer your PC and on GitHub. This email address will be added to Git. Run the following command:
$ git config --global user.email "email@example.com"
Confirm that you have set the email address correctly:
$ git config --global user.email firstname.lastname@example.org
NB: You also need to add your email address to your GitHub account.