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

On my Mac OS X 10.5 (Leopard) machine, I have installed Git 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

  • How do I prompt the user from within a commit-msg hook?
  • Git Fetch returns 'fatal: I don't handle protocol https' in windows
  • Jenkins Failed to connect to gerrit repository (Windows installation)
  • Pre Commit hook git error
  • How to remove the first commit in git?
  • Setting automatic GIT deployment of PHP project
  • Can I run “git clone 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.

  • How long should I keep my fork projects on github?
  • What is a changelist in IntelliJ IDEA?
  • Git + GitHub + Heroku
  • bitbucket can't pull/push from repository
  • How do you git fetch then merge? “Error: Your local changes to the following files would be overwritten by merge”
  • How to revert Master branch to upstream
  • 5 Solutions collect form web for “Best practice for maintaining updated Git binaries (Git by Git) on Mac OS X 10.5?”

    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)

    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.

    I pull the git source using:

    git clone git://

    and periodically do

    cd ~/git.git
    git pull
    make test
    sudo make install

    That way I keep up to date, and I’m using git to get git, which just feels like the right thing to do. I haven’t yet gone as far as adding a cron entry to do this automatically.

    (The first time I did this, of course, I downloaded the git source manually and built and installed it, to solve the obvious chicken-and-egg problem.)

    I compiled git from source with no problems, as far as i can tell no port is required so just keep your version updated in the usual way.

    I download the source and have a little script do the building and updating:

    sudo git clean -dxf
    git pull
    make prefix=/usr/local/git all
    sudo make prefix=/usr/local/git install

    this cleans up files before setting the prefix to my build location (/usr/local/git)

    Git Baby is a git and github fan, let's start git clone.