
Okay, with that disclaimer out of the way, let's continue. If you follow these steps precisely, you won't be at risk, but please do not start using "sudo", or editing system files if you're not exactly sure what you are doing. We'll be using "sudo", (which stands for super user do) which allows you to perform actions that standard users are not allowed to, in order to protect them from accidentally messing up their systems.
#Git for mac terminal series
(If you're not familiar with VI, I'd encourage you to checkout the " Command Line Basics" series on this site to get familiar with it.)īefore I proceed, I want to mention that what we're going to do could be harmful to your machine if done improperly. When I do that, you'll notice that "/usr/local/git/bin" is the last one in the list. You can see what the PATH includes by typing "echo $PATH" and pressing Enter.
#Git for mac terminal update
So, I just need to update my PATH variable and make sure that the path to the official version comes before the path to the version installed by Apple. This is simply because the path "/usr/local/git/bin" comes after the path used by the apple version of Git in my PATH variable. So, I've confirmed that I have an official version of Git installed on my system but, when I try to run "git -version" it still says I'm using "git version 1.9.3 (Apple Git-50)". Giving the official version priority over the one from Apple If you do see git in this list, like I do here, you should continue watching this video. If you don't see git in that list, you most likely don't have it installed and should stop watching this video, and instead, watch Updating Git if You Have Only the Version That Comes with Xcode or the Command Line Developer Tools. Run "ls /usr/local" and look through that list to find git. Checking for an existing Git installation We want to use the latest release, so let's check to see if we also have an official version installed that just isn't getting priority over the version from Apple.

The version in this example is 1.9.3, while 2.2.1 is the current latest release. If, when you run "git -version", you see a message like "git version 1.9.3 (Apple Git-50)" you have a version of Git from Apple.
