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.
Git Install
- To install Git on Windows, download the Git Executable File for Windows.
- To install Git on Mac, use the
brew install git
command after having installed Homebrew.
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).
Become a Git Master
Although very powerful, Git is very complex. I highly recommend that you follow Datacamp’s Git course to really become comfortable with Git commands and avoid painful mistakes.
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.
git --version
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: Brew 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
On Windows
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.
Other Version Control with Git and Github Posts
Learn Git and Github (Complete Guide)
Basics of Version Control
How to Use Git and Github with VSCode
SEO Strategist at Tripadvisor, ex- Seek (Melbourne, Australia). Specialized in technical SEO. Writer in Python, Information Retrieval, SEO and machine learning. Guest author at SearchEngineJournal, SearchEngineLand and OnCrawl.