The Artima Developer Community
Sponsored Link

Web Buzz Forum
Installing Git

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jonathan Dodds

Posts: 464
Nickname: jrdodds
Registered: Mar, 2004

Jonathan Dodds is a software engineer (among other things.)
Installing Git Posted: Jan 4, 2009 7:38 PM
Reply to this message Reply

This post originated from an RSS feed registered with Web Buzz by Jonathan Dodds.
Original Post: Installing Git
Feed Title: constructive nonconformist
Feed URL: http://jrdodds.blogs.com/blog/index.rdf
Feed Description: Software engineering and other topics.
Latest Web Buzz Posts
Latest Web Buzz Posts by Jonathan Dodds
Latest Posts From constructive nonconformist

Advertisement

This is a ‘note to self’ about Git and how to build and install on Mac OS X and how to install on Windows.

Building and Installing Git on Mac OS X (specifically 10.5 Leopard)

I haven’t been won over by Fink or MacPorts. There is the git-osx-installer project on Google Code which provides a DMG. But I’m comfortable with Makefiles and I have the Developer tools installed, so I build and install from the source.

Here are the steps I follow:

  1. Get the ‘latest stable GIT release’ from http://git.or.cz/. As of this post the latest stable Git release was v1.6.1. Get the tar.bz21 file, for example: git-1.6.1.tar.bz2.
  2. Unpack the tar file. I have a ~/Projects directory. In the Finder I typically move the tar file to ~/Projects and then double-click the tar. The Mac OS X 10.5 Archive Utility will handle the file. git-1.6.1.tar.bz2 will be unpacked into a directory named git-1.6.1.

    From the command line the tar command would be something like:
    tar xjf git-1.6.1.tar.bz2
  3. I want to install Git to /usr/local. I also want to be able to easily mange new Git installs and Git has lots of parts so I create a subdirectory for Git in /usr/local.
    1. Create a directory in /usr/local for the Git release, for example:
      sudo mkdir /usr/local/git-1.6.1
    2. Create a subdirectory for the Git release man pages, for example:
      sudo mkdir /usr/local/git-1.6.1/man
    3. If this is the first install of Git on the machine, create a symbolic link to the release directory:
      sudo ln -s /usr/local/git-1.6.1 /usr/local/git

      Going forward, /usr/local/git should always link to the release you currently want to use.
    4. Add /usr/local/git/bin to your PATH.
    5. Add /usr/local/git/man to your MANPATH.

  4. Change directory into the unpacked source code, for example:
    cd ~/Project/git-1.6.1
  5. Configure the build. Set the prefix to the directory the release should be installed into. For example:
    make configure
    ./configure --prefix=/usr/local/git-1.6.1
  6. Build Git.
    make
  7. Install Git.
    sudo make install
  8. Don’t bother building the man pages. Get the matching man pages tar from http://kernel.org/pub/software/scm/git/.

    For example: git-manpages-1.6.1.tar.bz2.

    From the command line, unpack the tar into the install location, for example:
    sudo tar xjf git-manpages-1.6.1.tar.bz2 -C /usr/local/git-1.6.1/man

  9. If needed, update the /usr/local/git symbolic link.

Resources for Git on Mac OS X:

Compiling git on OS X Leopard — GitHub Guides — GitHub
Compiling Git for Mac OS X Leopard (10.5)
A Funkaoshi Production :: Building Git on Mac OS X


Windows

I don’t build from scratch on Windows. I’m currently trying out the msysgit package from Google Code.


1The bzip2 compression is more efficient than the older gzip compression.

Read: Installing Git

Topic: Cloud OS is Finally Out with a Quick Startup, But... Previous Topic   Next Topic Topic: Data centre power cost

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use