There are several options for installing Git on macOS. Note that any non-source distributions are provided by third parties, and may not be up to date with the latest source release.
Use a Mac OS X installation Disc. If you’re unable to use Internet Recovery Mode or create a bootable USB installer, you can still use a Mac OS X installation disc. These discs are available for OS X Snow Leopard, OS X Lion, and OS X Mountain Lion. If your Mac is from 2012 or earlier, there was an installation disc in the original box. How to Install macOS on a PC Using the Installation USB. After you have successfully created your macOS installation USB, you will need to remove it from your Mac and plug it into the PC that you want to turn into a Hackintosh. This is a fairly long process that involves formatting the drive in your PC and performing a clean installation of macOS. There are several options for installing Git on macOS. Note that any non-source distributions are provided by third parties, and may not be up to date with the latest source release. Install homebrew if you don't already have it, then: $ brew install git. Apple ships a binary package of Git with Xcode. Binary installer.
Homebrew
Install homebrew if you don't already have it, then:$ brew install git
Xcode
Apple ships a binary package of Git with Xcode.
Binary installer
Tim Harper provides an installer for Git. The latest version is 2.27.0, which was released 3 months ago, on 2020-07-22.
Mac Os Install From Internet
Building from Source
Install Mac Os On Windows
If you prefer to build from source, you can find tarballs on kernel.org. The latest version is 2.29.1.