Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practice for maintaining updated Git binaries (Git by Git) on Mac OS X 10.5?

Tags:

git

macos

On my Mac OS X 10.5 (Leopard) machine, I have installed Git 1.6.0.2 using the git-OSX-Installer from Google Code. The installer installs Git to /usr/local/Git.

I would now like to keep up with the latest stable Git release (Master branch), currently 1.6.0.3.

Can I run "git clone git://git.kernel.org/pub/scm/git/git.git" from within the /usr/local/Git directory, then Configure/Make/Install using XCode, or will that not work?

Basically I'm looking for the best practice to keep Git updated to the latest stable version.

like image 922
Doug Avatar asked Nov 04 '08 22:11

Doug


People also ask

What is the latest git version for Mac?

Binary installer Tim Harper provides an installer for Git. The latest version is 2.33.0, which was released about 1 year ago, on 2021-08-30.

How do I find where Git is installed on my Mac?

How do I know if Git is installed? To see if Git is installed on your system, open your terminal and type git --version . If your terminal returns a Git version as an output, that confirms you have Git installed on your system. If not, you have to download Git for Mac or Windows.

How do I use Git on Mac?

The easiest way to install Git on a Mac is via the stand-alone installer: Download the latest Git for Mac installer. Follow the prompts to install Git. (Optional) To make Git remember your username and password when working with HTTPS repositories, configure the git-credential-osxkeychain helper.

Is git pre installed on Mac?

Git can be installed on the most common operating systems like Windows, Mac, and Linux. In fact, Git comes installed by default on most Mac and Linux machines!


2 Answers

I keep Git up to date on my Mac using MacPorts. I find that there is a lot of other stuff in MacPorts that I need as well, so this works well for me.

like image 21
Greg Hewgill Avatar answered Sep 26 '22 19:09

Greg Hewgill


The script x-git-update-to-latest-version will compile and install the latest version of git (from the git repository).

It's set to use the current HEAD revision of the master branch, but it should be easy enough to add a line or two to git checkout the stable branch.

It installs git into /usr/local/git-v1.6.0.2-287-g3791f77/ (for example), then symlinks /usr/local/git/ to the latest directory.

You can set it to run periodically (nightly?), either via cron (which is extremely simple, but has some irritating issues on OS X 10.5.x), or the slightly convoluted launchd (Lingon is a nice interface to this, although to start the job running without logging in/out, you have to run the command launchctrl load ~/Library/LaunchAgents/mylaunchagent.plist)

like image 80
dbr Avatar answered Sep 26 '22 19:09

dbr