If you're on macOS, you can get Git along with the Xcode Command Line Tools.

You can run xcode-select --install or try to run git from the Terminal; if you don’t have it, you'll be prompted to install it.

Great! After installing the Xcode Command Line Tools, we're all set to run git from the Terminal.