November 11th, 2020
Git is the most popular modern content control system in the world and an incredibly powerful and useful tool. This blog showcases the many avenues to installing Git using various package managers and operating systems.
Install on Linux
Git packages are available for the preferred package manager of your Linux distribution. It's easy to install Git, just copy the commands for your Linux distribution/version below.
Install on macOS
Apple actually ships macOS with a fork of Git. It works out-of-the-box in any macOS machine, however, it may be missing a few cutting-edge features as it tends to lag behind the mainstream Git project.
We suggest checking the installed Git version in your machine first.
Compare the output of the command with the latest version available on the official website. If you see differences, continue to install the latest Git version on macOS with any of these package managers.
Install with Homebrew
Homebrew is a package manager for macOS that installs the stuff you need that Apple didn't provide out of the box. Homebrew is very popular and easy to use.
Install homebrew if you don't already have it
Install with MacPorts
The MacPorts Project is an open-source package manager for compiling, installing, and upgrading command-line software on macOS. You can follow instructions for installing MacPorts at this link.
Install on Windows
Git comes already installed with most of the Windows Subsystem for Linux distributions, however, you may want to update to the latest version.
Git config file setup
The first thing you should do when you install Git is to set your user name and email address. This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating.
Enter your name
Enter your email
See the official Git documentation here.