Open up a terminal window and install Git using the following command: brew install git.If you already have Homwbrew installed, you can follow the below steps to install Git: Homebrew is a popular package manager for macOS. The download source is the same macOS Git Installer as referenced in the steps above. The advantage of downloading Git from git-scm is that your download automatically starts with the latest version of Git. Note: git-scm is a popular and recommended resource for downloading Git on a Mac. Open the command prompt "terminal" and type git version to verify Git was installed.Once the installer has started, follow the instructions as provided until the installation is complete.Navigate to the latest macOS Git Installer and download the latest version.However, if you don't have Git installed for whatever reason, you can install the latest version of Git using one of several popular methods as listed below: Install Git From an Installer Most versions of MacOS will already have Git installed, and you can activate it through the terminal with git version. The download source is the same Git for Windows installer as referenced in the steps above. The advantage of downloading Git from git-scm is that your download automatically starts with the latest version of Git included with the recommended command prompt, Git Bash. Note: git-scm is a popular and recommended resource for downloading Git for Windows. Type git version to verify Git was installed.Open the windows command prompt (or Git Bash if you selected not to use the standard Git Windows Command Prompt during the Git installation).Once the installer has started, follow the instructions as provided in the Git Setup wizard screen until the installation is complete.Navigate to the latest Git for Windows installer and download the latest version.Regardless of if you have Git installed or not, GitHub Desktop offers a simple collaboration tool for Git. With GitHub Desktop, you get a command line version of Git with a robust GUI.
Installing GitHub Desktop will also install the latest version of Git if you don't already have it. If it's an unknown command, read further and find out how to install Git. The output will either tell you which version of Git is installed, or it will alert you that git is an unknown command.
Once you've opened your terminal application, type git version.
In fact, Git comes installed by default on most Mac and Linux machines! Checking for Git Git can be installed on the most common operating systems like Windows, Mac, and Linux.