Download for WindowsClick here to download the latest (2.38.0) 64-bit version of Git for Windows. This is the most recent maintained build. It was released 14 days ago, on 2022-10-03. Show Other Git for Windows downloadsStandalone Installer32-bit Git for Windows Setup. 64-bit Git for Windows Setup. Portable ("thumbdrive edition")32-bit Git for Windows Portable. 64-bit Git for Windows Portable. Using winget tool Install
winget tool if you don't already have it, then type this command in command prompt or Powershell. The current source code release is version 2.38.0. If you want the newer version, you can build it from the source code. Now What?Now that you have downloaded Git, it's time to start using it.
Before you start using Git, you have to make it available on your computer. Even if it’s already installed, it’s probably a good idea to update to the latest version. You can either install it as a package or via another installer, or download the source code and compile it yourself. Installing on Linux If you want to install the basic Git tools on Linux via a binary installer, you can generally do so through the package management tool that comes
with your distribution. If you’re on Fedora (or any closely-related RPM-based distribution, such as RHEL or CentOS), you can use
If you’re on a Debian-based distribution, such as Ubuntu, try
For more options, there are instructions for installing on several different Unix distributions on the Git website, at https://git-scm.com/download/linux. Installing on macOS There are several ways to install Git on a Mac. The easiest is probably to install the Xcode Command Line Tools. On Mavericks (10.9) or above you can do this simply by trying to run If you don’t have it installed already, it will prompt you to install it. If you want a more up to date version, you can also install it via a binary installer. A macOS Git installer is maintained and available for download at the Git website, at https://git-scm.com/download/mac. Figure 7. Git macOS Installer Installing on WindowsThere are also a few ways to install Git on Windows. The most official build is available for download on the Git website. Just go to https://git-scm.com/download/win and the download will start automatically. Note that this is a project called Git for Windows, which is separate from Git itself; for more information on it, go to https://gitforwindows.org. To get an automated installation you can use the Git Chocolatey package. Note that the Chocolatey package is community maintained. Installing from SourceSome people may instead find it useful to install Git from source, because you’ll get the most recent version. The binary installers tend to be a bit behind, though as Git has matured in recent years, this has made less of a difference. If you do want to
install Git from source, you need to have the following libraries that Git depends on: autotools, curl, zlib, openssl, expat, and libiconv. For example, if you’re on a system that has
In order to be able to add the documentation in various formats (doc, html, info), these additional dependencies are required:
If you’re using a Debian-based distribution (Debian/Ubuntu/Ubuntu-derivatives), you also need the
If you’re using a RPM-based distribution (Fedora/RHEL/RHEL-derivatives), you also need the
Additionally, if you’re using Fedora/RHEL/RHEL-derivatives, you need to do this:
due to binary name differences. When you have all the necessary dependencies, you can go ahead and grab the latest tagged release tarball from several places. You can get it via the kernel.org site, at https://www.kernel.org/pub/software/scm/git, or the mirror on the GitHub website, at https://github.com/git/git/releases. It’s generally a little clearer what the latest version is on the GitHub page, but the kernel.org page also has release signatures if you want to verify your download. Then, compile and install:
After this is done, you can also get Git via Git itself for updates: |