[Git setup] setup git on Mac machine

Struggled for hour and get git work now ( just like old time in linux).

It used to be very easy to work with git in linux, just sudo apt-get install git … and things are done.

But it’s a little bit fuzzy with this new Mac machine.

After downloading a version of git from http://git-scm.com/download/mac

The next thing you want to try is to open terminal and type in the most lovely command “git”

But strange thing happens, it saids “bash-git command not found”

WTF, I just installed it seconds ago.

Wow, this happens because we need to tell the system what should it’s supposed to do with that command.

Your git stuffs in now in “/usr/local/git/bin/git

You need to create a symbol link to “/usr/local/bin”

Follow these steps

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

Done !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: