Git is a version control tool that allows you to manage versions of your files on your local machine. To be able to use it with Github properly, you need to install Git. Let’s learn how to install Git on a PC or a Mac.
What’s the Difference Between Git and Github?
Git is the tool that will let you create a local repository (on your PC) and manage versions of your files, whereas Github is an online service that will host your Git repositories (in the cloud).
1. Check if Git is Already Installed
To see if Git is already installed on your PC, or Mac you need to go to the command line (on Windows) , or in the terminal (on Mac).
Type in this command.
If it is not installed, you will be prompt to install it.
2. Install Git
Installing Git is pretty straightforward.
Install Git On Windows
Installing Git on Windows is super simple.
Just go to the Git Download Folder and follow the steps shown in this video.
Install Git on Mac
The easiest way to install Git on Mac is to use Homebrew.
Step 1: Download Homebrew
Homebrew is a package manager that simplifies the installation of Softwares on the macOS operating system.
Go to Terminal and type:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Step 2: Install Git
In the Terminal, copy and paste this command-line to install Git.
brew install git
3. Check if Git is Properly Installed
git version 2.20.1.windows.1
On Mac OS X
git version 2.20.1 (Apple Git-117)
This is it, you now know how to install Git on Mac and Windows.