Install Git on Mac OS X 10.7 Lion

  1. Download the latest version of Git from the Git Project Home
    1. If there is no specific version for Lion, the version for Snow Leopard works just fine.
  2. Open the .dmg file you downloaded
  3. Run the package
  4. Restart your computer
This entry was posted in Development, How-Tos. Bookmark the permalink.

10 Responses to Install Git on Mac OS X 10.7 Lion

  1. marcio says:

    Nice and simple. But not complete. :)

    May I suggest: Step 4 isn’t necessary I believe.

    After step 3 we should look into to see our git:
    3)
    /usr/local/git

    Also,

    4)
    you’ll need to either add it to your $PATH or make a symlink placing the binary inside a directory that is in your existing PATH.

    A common practice is to make /usr/local/bin if it doesn’t exist and add a link:

    sudo -s
    mkdir -p /usr/local/bin
    ln -s /usr/local/git/bin/git /usr/local/bin/git
    exit

    5)
    then, restart the terminal.

    We can now type git from our command line.

  2. Devin says:

    Thank you for your comment.

    The Mac OS X Snow Leopard git installer handles the copying of files and $PATH variables without any issue. If a user would like to verify that it was installed to the right directory, they can check in /usr/local/git.

    I suggested the restart in order to ensure the $PATH variable is populated system-wide, and not for the user terminal session only.

  3. Daniel says:

    Guys, I want to thank you very much for this solution! I am new to all this stuff and after dragging through endless sites, your explanation was concise and clear, AND it worked!! Thanks!!

  4. Pingback: Git For Lion

  5. Tom Hearne says:

    This is great, works really well, thanks Devin.

  6. f. says:

    It’s a bit of an old post, but git resides under /usr/local that is not in your path in OS X Lion. Just add it :

    export PATH=$PATH:/usr/local/git/bin/

    Then :

    source ~/.bash_profile

  7. Kavin says:

    I have a problem on installing git on mac os x lion. I got a error indicating “no mountable file system” error. can anyone suggest how to fix this errors.

  8. Yashprit says:

    Thanks you guys, I am very new to Mac os X just bought it few days back and I was struggling like anything to find out how to have git command from terminal. It nicely worked from me, use any package from google code project download and install and restart terminal it work like charm, no need of anything it does everything by itself, but if in any case it does allow you to use git from from terminal than they also provide .sh to set path just run it from terminal

  9. Lindsey R says:

    Thanks so much! Been looking at a ton of other websites for help and this does the trick

  10. Jake Jones | @Gewgawn says:

    Awesome! I’m working from an older Mac and this was super helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>