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.
Homebrew
Install homebrew if you don't already have it, then:$ brew install git
Xcode
If you are a network administrator, you can deploy GitHub Desktop to computers running Windows on an Active Directory-managed network by using the Windows Installer package file (.msi) with Group Policy or another remote installation system. If you search Chocolatey packages yourself, you might see two packages that install Git – “Git (Install) 2.20.1” and “Git 2.20.1”, at the time of writing. I believe “Git (Install) 2.20.1” is technically the more correct, but I also think it doesn’t really matter which one you use. A rather confusing explanation is found here.
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.
Building from Source
Installing Github For Mac Os
If you prefer to build from source, you can find tarballs on kernel.org. The latest version is 2.29.1.