How to Check the Git Version You Are Running on Mac

About: I am the CEO of I build AI that is used to do everything from moderate comments, to find off label uses for FDA approved drugs to treat children with cancer, to tracking down human traffickers.

Mac OS X comes with a version of Git baked in. This is convenient, but it is generally always out of date. You can check to see if your version of Git is current by typing "git --version"

But what can be very confusing is that if you installed Git, you might actually be running the built in version.

Step 1: How to Know Which Git You Are Running

If you type "Which Git"

The command line interface will report which install of Git you are running.

If you installed Git (which I recommend) you should see something like "/usr/local/bin/git"

If you are running the Apple version you will see "/usr/bin"



    • Remix Contest

      Remix Contest
    • Organization Contest

      Organization Contest
    • Warm and Fuzzy Contest

      Warm and Fuzzy Contest



    3 years ago on Introduction

    Thanks! I can imagine a couple more things you'll want to add here, as guidance for users who may not be completely command-line savvy.

    1) You might want to show the output of |git --version| for the two cases of the Mac built-in vs. the latest install. On my Mavericks machine, I get:

    {michaels-mbp:746} which git


    {michaels-mbp:747} git --version

    git version 1.9.3 (Apple Git-50)

    2) You correctly point out the two different paths for a local install vs. the built-in version. It might help users to know how to get the "right" one without having to know and type the path each time. That is, setting PATH in .login or .profile to ensure that /usr/local/bin is earlier in the list than /usr/bin.

    3) You may also want to provide a cross-link in the introduction back to your nice I'ble on installing a better version of Git. Relying on the "More by" or "Related" sidebar tabulations may not be a good choice :-)