Setting up Git
So far, we have been using Git to just download files from GitHub. In this section, we will go a bit further by setting up Git variables so we can start committing our files. I am going to use the same Ubuntu 16.04 host in the example. The installation process is well-documented; if you are using a different version of Linux or other operating systems, a quick search should land you at the right set of instructions.
If you have not done so already, install Git via the apt
package-management tool:
$ sudo apt-get update $ sudo apt-get install -y git $ git --version git version 2.7.4
Once git
is installed, we need to configure a few things so our commit messages can contain the correct information:
$ git config --global user.name "Your Name" $ git config --global user.email "email@domain.com" $ git config --list user.name=Your Name user.email=email@domain.com
Alternatively, you can modify the information in the ~/.gitconfig
file:
$ cat ~/.gitconfig [user] name = Your Name email...