Git SCM does not comes out-of-the-box(OOTB) with Mac OS X. However if you have installedXcode command line tools or standalone Git Installer then you will have Git SCM on Mac OS X.
It consists of a command line terminal called mintty, bash, version control systems like git and subversion, tools like tar and awk and even build systems like autotools, all based on a modified version of Cygwin. MSYS2 provides up-to-date native builds for GCC, mingw-w64, CPython, CMake, Meson, OpenSSL, FFmpeg, Rust, Ruby, just to name a few. Mac OS X: Windows: Linux/Unix: Older releases are available and the Git source repository is on GitHub. Latest source Release 2.28.0 Release Notes (2020-07-27) Download Source Code. Git comes with built-in GUI tools (git-gui, gitk).
Warm Up!
Let’s check existing Git version on your machine.
Scenario 1: You will get similar to this version!
2 |
Let’s start Git upgrade
First thing, get the latest Git SCM for Mac OS X Click here to Download(from git-scm.com). You will get.dmg file. In this article I’m using current latest version of Git SCM 1.7.11.3 for upgrade!
- Open the downloadedgit-x.x.x.x-intel-universal-snow-leopard.dmg
- You will seeuninstall.sh, Run this shell script (if you have scenario 2 on your machine, skip this step)
- Run thegit-x.x.x.x-intel-universal-snow-leopard.pkg installer and follow the installer instruction
- This installs the Git in/usr/local/git (root access is required)
Once you finished the package execution (after, click of ‘Finish‘ button)
Git Upgrade Verification
Restart your bash session. If you wish to preserve your precious screen session, just executesource /etc/profile. Verifying Git version
2 4 6 8 10 | mac-book-pro:~jeeva$/bin/sh'/Volumes/Git 1.7.11.3 Snow Leopard Intel Universal/setup git PATH for non-terminal programs.sh' 2012-07-2814:03:57.593defaults[5177:707] The domain/defaultpair of(/Users/jeeva/.MacOSX/environment,PATH)does notexist Variable PATH in~/.MacOSX/environment.plistchanged from'/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin'to'/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin' You will need tolog out of your Mac OSXuser account andlog back inforchanges totake effect. ~ mac-book-pro:~jeeva$ |
Above script will add thePATH andMANPATH to your~/.MacOSX/environment.plist file.
You’ll need to log out of your user account for that to take effect.