Git Guides - install git · GitHub
https://github.com/git-guides/install-git • 208 KB fetched Open original page
Git Guides - install git · GitHub
Skip to content
Navigation Menu
Sign in
* Platform
* AI CODE CREATION
* GitHub Copilot Write better code with AI
* GitHub Copilot app Direct agents from issue to merge
* MCP Registry Integrate external tools
* DEVELOPER WORKFLOWS
* Actions Automate any workflow
* Codespaces Instant dev environments
* Issues Plan and track work
* Code Review Manage code changes
* Code Quality Enforce quality at merge
* APPLICATION SECURITY
* GitHub Advanced Security Find and fix vulnerabilities
* Code security Secure your code as you build
* Secret protection Stop leaks before they start
* EXPLORE
* Why GitHub
* Documentation
* Blog
* Changelog
* Marketplace
View all features
* Solutions
* BY COMPANY SIZE
* Enterprises
* Small and medium teams
* Startups
* Nonprofits
* BY USE CASE
* App Modernization
* DevSecOps
* DevOps
* CI/CD
* View all use cases
* BY INDUSTRY
* Healthcare
* Financial services
* Manufacturing
* Government
* View all industries
View all solutions
* Resources
* EXPLORE BY TOPIC
* AI
* Software Development
* DevOps
* Security
* View all topics
* EXPLORE BY TYPE
* Customer stories
* Events & webinars
* Ebooks & reports
* Business insights
* GitHub Skills
* SUPPORT & SERVICES
* Documentation
* Customer support
* Community forum
* Trust center
* Partners
View all resources
* Open Source
* COMMUNITY
* GitHub Sponsors Fund open source developers
* PROGRAMS
* Security Lab
* Maintainer Community
* GitHub Stars
* Archive Program
* REPOSITORIES
* Topics
* Trending
* Collections
* Enterprise
* ENTERPRISE SOLUTIONS
* Enterprise platform AI-powered developer platform
* AVAILABLE ADD-ONS
* GitHub Advanced Security Enterprise-grade security features
* Copilot for Business Enterprise-grade AI features
* Premium Support Enterprise-grade 24/7 support
* Pricing
Search /
Sign in
Sign up
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
Git Guides
Git
Install
Init
Clone
Add
Commit
Remote
Status
Pull
Push
Sign up
Install Git
How to install Git on any OS
Git can be installed on the most common operating systems like Windows, Mac, and Linux. In fact, Git comes installed by default on most Mac and Linux machines!
Checking for Git
To see if you already have Git installed, open up your terminal application.
* If you're on a Mac, look for a command prompt application called "Terminal".
* If you're on a Windows machine, open the windows command prompt or "Git Bash".
Once you've opened your terminal application, type git version . The output will either tell you which version of Git is installed, or it will alert you that git is an unknown command. If it's an unknown command, read further and find out how to install Git.
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. Regardless of if you have Git installed or not, GitHub Desktop offers a simple collaboration tool for Git. You can learn more here .
Install Git on Windows
* Navigate to the latest Git for Windows installer and download the latest version.
* Once the installer has started, follow the instructions as provided in the Git Setup wizard screen until the installation is complete.
* Open the windows command prompt (or Git Bash if you selected not to use the standard Git Windows Command Prompt during the Git installation).
* Type git version to verify Git was installed.
Note: git-scm is a popular and recommended resource for downloading Git for Windows. 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 . The download source is the same Git for Windows installer as referenced in the steps above.
Install Git on Windows through Visual Studio Code
GitHub integration is provided through the GitHub Pull Requests and Issues extension .
To get started with the GitHub in VS Code, you'll need to create an account and install the GitHub Pull Requests and Issues extension.
Once you've installed the GitHub Pull Requests and Issues extension , you'll need to sign in. Follow the prompts to authenticate with GitHub and return to VS Code.
Note: You can perform actions like, you can search for and clone a repository from GitHub using the Git: Clone command in the Command Palette (Ctrl+Shift+P) or by using the Clone Repository button in the Source Control view (available when you have no folder open).
Learn more here
Install Git on Mac
Most versions of MacOS will already have Git installed, and you can activate it through the terminal with git 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
* Navigate to the latest macOS Git Installer and download the latest version.
* Once the installer has started, follow the instructions as provided until the installation is complete.
* Open the command prompt "terminal" and type git version to verify Git was installed.
Note: git-scm is a popular and recommended resource for downloading Git on a Mac. The advantage of downloading Git from git-scm is that your download automatically starts with the latest version of Git. The download source is the same macOS Git Installer as referenced in the steps above.
Install Git from Homebrew
Homebrew is a popular package manager for macOS. If you already have Homebrew installed, you can follow the below steps to install Git:
* Open up a terminal window and install Git using the following command: brew install git .
* Once the command output has been completed, you can verify the installation by typing: git version .
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.
You can install Git on Linux through the package management tool that comes with your distribution.
Debian/Ubuntu
* Git packages are available using apt .
* It's a good idea to make sure you're running the latest version. To do so, Navigate to your command prompt shell and run the following command to make sure everything is up-to-date: sudo apt-get update .
* To install Git, run the following command: sudo apt-get install git-all .
* Once the command output has been completed, you can verify the installation by typing: git version .
Fedora
* Git packages are available using dnf .
* To install Git, navigate to your command prompt shell and run the following command: sudo dnf install git-all .
* Once the command output has been completed, you can verify the installation by typing: git version .
Note: You can download the proper Git versions and read more about how to install on specific Linux systems, like installing Git on Ubuntu or Fedora, in git-scm's documentation .
Other Methods of Installing Git
Looking to install Git via the source code? Learn more here .
Contribute to this article on GitHub.
Get started with git and GitHub
Review code, manage projects, and build software alongside 40 million developers.
Sign up for GitHub
Sign in
Site-wide Links
The developer newsletter
Get tips, technical guides, and best practices. Twice a month. Right in your inbox.
Subscribe
Platform
* Features
* Enterprise
* Copilot
* AI
* Security
* Pricing
* Team
* Resources
* Roadmap
* Compare GitHub
Ecosystem
* Developer API
* Partners
* Education
* GitHub CLI
* GitHub Desktop
* GitHub Mobile
* GitHub Marketplace
* MCP Registry
Support
* Docs
* Community Forum
* Professional Services
* Premium Support
* Skills
* Status
* Contact GitHub
* What is Git?
* Sitemap
Company
* About
* Why GitHub
* Customer Stories
* Blog
* The ReadME Project
* Careers
* Newsroom
* Inclusion
* Social Impact
* Shop
* © 2026 GitHub, Inc.
* Terms
* Privacy
* Manage cookies
* Do not share my personal information
* GitHub on LinkedIn
* GitHub on Instagram
* GitHub on YouTube
* GitHub on X
* GitHub on TikTok
* GitHub on Twitch
* GitHub’s organization on GitHub
English
You can’t perform that action at this time.
Links found on this page
- Skip to content [direct]
- Sign in [direct]
- GitHub Copilot Write better code with AI [direct]
- GitHub Copilot app Direct agents from issue to merge [direct]
- MCP Registry Integrate external tools [direct]
- Actions Automate any workflow [direct]
- Codespaces Instant dev environments [direct]
- Issues Plan and track work [direct]
- Code Review Manage code changes [direct]
- Code Quality Enforce quality at merge [direct]
- GitHub Advanced Security Find and fix vulnerabilities [direct]
- Code security Secure your code as you build [direct]
- Secret protection Stop leaks before they start [direct]
- Why GitHub [direct]
- Documentation [direct]
- Blog [direct]
- Changelog [direct]
- Marketplace [direct]
- View all features [direct]
- Enterprises [direct]
- Small and medium teams [direct]
- Startups [direct]
- Nonprofits [direct]
- App Modernization [direct]
- DevSecOps [direct]
- DevOps [direct]
- CI/CD [direct]
- View all use cases [direct]
- Healthcare [direct]
- Financial services [direct]
- Manufacturing [direct]
- Government [direct]
- View all industries [direct]
- View all solutions [direct]
- AI [direct]
- Software Development [direct]
- DevOps [direct]
- Security [direct]
- View all topics [direct]
- Customer stories [direct]
- Events & webinars [direct]
- Ebooks & reports [direct]
- Business insights [direct]
- GitHub Skills [direct]
- Customer support [direct]
- Community forum [direct]
- Trust center [direct]
- Partners [direct]
- View all resources [direct]
- GitHub Sponsors Fund open source developers [direct]
- Security Lab [direct]
- Maintainer Community [direct]
- GitHub Stars [direct]
- Archive Program [direct]
- Topics [direct]
- Trending [direct]
- Collections [direct]
- Copilot for Business Enterprise-grade AI features [direct]
- Premium Support Enterprise-grade 24/7 support [direct]
- Pricing [direct]
- Sign up [direct]
- Git Guides [direct]
- Init [direct]
- Clone [direct]
- Add [direct]
- Commit [direct]
- Remote [direct]
- Status [direct]
- Pull [direct]
- Push [direct]
- Sign up [direct]
- learn more here [direct]
- Git for Windows installer [direct]
- git-scm [direct]
- GitHub Pull Requests and Issues extension [direct]
- Learn more here [direct]
- macOS Git Installer [direct]
- git-scm [direct]
- Homebrew [direct]
- in git-scm's documentation [direct]
|
|