Install Git on Mac

My favorite Git client for OS X is GitBox – it’s incredibly simple and makes working with git-based repositories really easy.

Still, there are times where I prefer the command line for a couple of things and the various GUI clients come up short. If you’ve not installed the OS X Developer Tools, like Xcode, on your machine, then you’re likely unable to use a command line version of the application that is bundled with your client of choice.

Here’s how to do it:

Install Git On Mac OS X

First, you have to install the command line application.

  1. Head over to the Git downloads page.
  2. Select the version of Mac OS X.
  3. Once it’s downloaded, install the package like you would for any other Mac application

Next, close your terminal sessions, restart, and you should be good to go.

Store Your Credentials

If you do a lot of work with the command line, then you’ll probably want to store your username and email with Git so you don’t have to enter it every time that you need to commit something back to the repository.

To do this, launch a new session in Terminal and issue the following commands:

git config --global user.name "YourUserName"
git config --global user.email email@domain.com

To verify that this worked, you can issue the following the commands and you should see the values that you just entered returned to the command line:

git config --global user.name 
git config --global user.email

Now you should be able to use both your favorite frontend application as well as the command line when working with your repositories.

Category:
Tips

Join the conversation! 2 Comments

  1. Hi !

    I recently installed git, I have a question, the terminal is the only way to use it ? Or are there other interfaces for working on git ?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.