This tutorial covers the following topics:
How to install GIT on Linux
On Linux you can compile the GIT system from source or use the following commands:
apt-get install git-core
for Ubuntu/Debian or:
yum install git-core
You’ll be asked to confirm the download and installation; simply enter y to confirm. Once this command is complete, git will be installed and ready to use!
How to install GIT on MAC
The easiest way to install Git on a Mac is via the stand-alone installer, which you can download from here. Open the newly downloaded file an follow the prompts to perform the installation.
To confirm the GIT installation is correct, open a new Terminal window and type in the following command:
If GIT is installed, the above command should output the current version installed.
Configuring GIT before first use
Before you start using GIT, you should configure your username and email. These details will be associated with any commits that you create. To perform the configuration, run the following commands:
git config --global user.name "your_username"
git config --global user.email "firstname.lastname@example.org"
Replace your_username and email@example.com with your actual username and email address.