Git Installation and Setup
Contents
2.1. Git Installation and Setup#
2.1.1. Windows#
Download the Windows installer from the official git website.
Then, execute the installer with the default configuration.
Afterwards, the git bash
terminal will be install and allow you to use the git commands.
2.1.1.1. WSL#
When using WSL, follow the instruction for the Linux procedure below.
2.1.2. OSX#
$ brew install git
2.1.3. Linux#
2.1.3.1. Ubuntu#
$ apt install git-all
2.1.3.2. Fedora and CentOS#
$ yum install git
2.1.3.3. Arch#
$ pacman -S git
2.1.4. Minimal configuration of Git#
Before we start using Git, we need to do some minimal configuration.
Use git config
to set up a username and an email as follow
$ git config --global user.name [Username]
$ git config --global user.email [Email]
This is important for when collaborating with other users as it will help identifying who contributed which part of the project.
Note: when using --global
this will set it up for any Git repository for your user on the computer. Therefore, it can be done only once.