Install on Linux
Git packages are avaiable for your preferred package manager of your Linux distro. It's easy to install Git, just copy the commands for your Linux Distro/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 to check 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 Git with Homebrew
Homebrew is a package manager for macOS that installs the stuff you need that Apple didn't. Is very popular and easy to use.
Install homebrew if you don't already have it
Install Git with MacPorts
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 in this link.
Install Git on WIndows Subsystem for Linux (WSL)
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
Now your email
Normally, you need to do this only once if you pass the --global option, because then Git will always use that information for anything you do on that system.