Install Git On Mac Catalina

This article shows how to install Maven (3.6.3) on macOS Big Sur (version 11.1).

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 git from the Terminal the very first time. $ git -version. If you don’t have it installed already, it will prompt you to install it. If the above command returns nothing, then Xdebug is not available on your install. Go back the steps to find out what's missing. References and thanks: Can't compile a C program on a Mac after upgrading to Catalina 10.15; Missing system headers (/usr/include) on macOS Catalina; Installation of Xdebug on MacOS Catalina 10.15; PHP 7.3.8.

Topics

Related Articles

1. Homebrew install Maven on macOS

1.1 Install Homebrew, a package manager on macOS.

1.2 The command brew install maven will install the latest Maven.

Terminal

1.3 Done. The Maven is installed on macOS.

P.S At the time of writing, the latest Maven version is 3.6.3

1.4 Where does Homebrew installed the Maven?
The brew will install the Maven packages at /usr/local/Cellar/maven/${version}

Mac
Terminal

The brew also creates shortcut or symbolic links at /usr/local/opt/maven/

1.5 Where does Homebrew put the Maven configuration file, settings.xml?
The settings.xml is available at /usr/local/opt/maven/libexec/conf

Install Git On Catalina

MacInstall git on mac catalina os
Terminal

1.6 Where does Homebrew put the core mvn executable file?
The mvn is at /usr/local/bin/

Terminal

1.7 brew info maven to show the detail of the Maven package.

1.8 brew list maven

Terminal

1.9 Useful commands:

  • brew upgrade maven to upgrade Maven.
  • brew uninstall maven to uninstall Maven.

2. Install Maven Manually

If Homebrew failed you or you don’t want the black-box magic, try to install the Maven manually.

2.1 Download the Maven, for example apache-maven-3.6.3-bin.tar.gz

2.2 The below command extracts the downloaded .tar.gz file to the current user’s home directory ~

Catalina

2.3 Now, the Maven folder is at this path /Users/mkyong/apache-maven-3.6.3

Terminal

2.4 On macOS 10.5 Catalina or later, the default shell is zsh, and we can create the environment variables MAVEN_HOME and update the PATH in ~/.zshenv.

Open the ~/.zshenv and append the following content.

Install Git On Mac Catalina Download

Note
For macOS 10.14 Mojave and before, the default Terminal shell is bash, and we can create the environment variables in ~/.bash_profile.

Open the ~/.bash_profile and append the following content.

Install Git On Mac Catalina Free

~/.bash_profile

P.S Read this Zsh Startup Files.

2.5 Source the ~/.zshenv to reflect the changes.

Git

2.6 Verification.

How To Install Git On Macos Catalina

Terminal

Install Git On Mac Catalina Update

Done.

References

How Do I Install Git On Mac

mkyong

Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.