Checking for Git
To see if you already have Git installed, open up your terminal application.Open your terminal
- Mac: Look for a command prompt application called “Terminal”
- Windows: Open the windows command prompt or “Git Bash”
If
git is an unknown command, read further to find out how to install Git for your operating system.Install Git Using GitHub Desktop
Installing GitHub Desktop will also install the latest version of Git if you don’t already have it. With GitHub Desktop, you get a command-line version of Git with a robust GUI.GitHub Desktop
Download GitHub Desktop for a simple collaboration tool for Git
Install Git on Windows
Download the installer
Navigate to the latest Git for Windows installer and download the latest version.
Run the installer
Once the installer has started, follow the instructions as provided in the Git Setup wizard screen until the installation is complete.
Open command prompt
Open the windows command prompt (or Git Bash if you selected not to use the standard Git Windows Command Prompt during the Git installation).
Install Git on Windows through Visual Studio Code
GitHub integration is provided through the GitHub Pull Requests and Issues extension.Learn More
Read the full VS Code GitHub documentation
Install Git on Mac
Most versions of MacOS will already haveGit installed, and you can activate it through the terminal with git version. However, if you don’t have Git installed, you can install the latest version using one of several popular methods:
Install Git From an Installer
Download the installer
Navigate to the latest macOS Git Installer and download the latest version.
Run the installer
Once the installer has started, follow the instructions as provided until the installation is complete.
Install Git from Homebrew
Homebrew is a popular package manager for macOS. If you already have Homebrew installed, you can follow these steps:Install Git on Linux
Fun fact: Git was originally developed to version the Linux operating system! So, it only makes sense that it is easy to configure to run on Linux.
Git on Linux through the package management tool that comes with your distribution.
Debian/Ubuntu
Update package list
Navigate to your command prompt shell and run the following command to make sure everything is up-to-date:
Fedora
Other Methods of Installing Git
Looking to install Git via the source code? Learn more here.Next Steps
Git Overview
Learn the basics of Git and why to use it
Git Init
Initialize your first Git repository
Git Clone
Clone an existing repository
Git Status
Check the status of your repository