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
Homebrew complements macOS (or your Linux system). Install your RubyGems with gem and their dependencies with brew. “To install, drag this icon” no more. Homebrew Cask installs macOS apps, fonts and plugins and other non-open source software. $ brew install -cask firefox. Making a cask is as simple as creating a formula. Brew Macos Catalina Additionally, SUMO provides native macOS application bundles for its graphical applications, so they can be added to the macOS dock. There is a separate brew cask that will copy these bundles to the Applications folder: brew cask install sumo-gui. In this tutorial we will learn to install Apache, MySQL, PHP on macOS Catalina 10.15. About macOS Catalina. Apple released macOS Catalina 10.15 on 7th October 2019 and it includes Apache and PHP. So, all we have to do is enable them. Then install MySQL and we are ready for development. So, lets get started.
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.32.0, which was released 20 days ago, on 2021-07-21.
Building from Source
If you prefer to build from source, you can find tarballs on kernel.org. The latest version is 2.32.0.
Installing git-gui
If you would like to install git-gui and gitk, git's commit GUI and interactive history browser, you can do so using homebrew$ brew install git-gui
Install Command Line Tools
To install the command line tools to compile native extensions, open a terminal and run:
set SDKROOT (only macOS Catalina or later)
Starting on macOS Catalina (10.15) the headers used for Ruby have been moved from their previous location which results in some gems, including Jekyll to fail installation. This can be solved by setting SDKROOT in your shell configuration to the value provided by xcrun.
Install Ruby
Jekyll requires Ruby v2.5.0 or higher.macOS Big Sur 11.x ships with Ruby 2.6.3. Check your Ruby version using ruby -v
.
If you’re running a previous version of macOS, you’ll have to install a newer version of Ruby. Installation with Homebrew is simple if you’re only planning to use Ruby for Jekyll. Install with a version manager such as asdf, chruby, rbenv, or rvm if you need to switch among Ruby versions (instructions for rbenv are below). See the guide Install Ruby on Mac for details and recommendations.
With Homebrew
To run the latest Ruby version you need to install it through Homebrew.
Add the brew ruby and gems path to your shell configuration:
Relaunch your terminal and check your Ruby setup:
You’re now running the current stable version of Ruby!
Install Homebrew Mac Os Catalina
With rbenv
People often use rbenv to manage multipleRuby versions. This is very useful when you need to be able to run a given Ruby version on a project.
Restart your terminal to apply your changes.Next, you can install the Ruby version you want. Let’s install the latest stable version:
That’s it! Head over to rbenv command references to learn how to use different versions of Ruby in your projects.
Install Jekyll
Install Brew On Mac Catalina
After installing Ruby, install Jekyll and Bundler.
Local Install
Install the bundler and jekyll gems:
Get your Ruby version:
Append your path file with the following, replacing the X.X
with the first two digits of your Ruby version:
Check that GEM PATHS:
points to your home directory:
Every time you update Ruby to a version in which the first two digits change, update your path to match.
Global Install
We recommend not installing Ruby gems globally to avoid file permissions problems and using sudo
.
On Mojave (10.14)
Because of SIP Protections in Mojave, run:
Before Mojave (<10.14)
Run:
Troubleshooting
Brew Install Mysql Mac Catalina
See Troubleshooting or ask for help on our forum.