Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 2 on OS X Lion not finding git binary in PATH

I'm just getting started with my dev environment on OS X Lion and recently installed Sublime Text 2 and git integration using Package Control. So, when I press CMD+SHIFT+P I get all the relevant git commands.

However, whenever I use one, I get the same error message: sublime-git-error

Here's what I've done to try and fix it:

I ran mdfind -name git in terminal and noticed that all the binaries from my git install (v. 1.7.10.3) are located in /usr/local/git/bin so I tried editing ~/.profile with this line:

export PATH="/usr/local/git/bin:/usr/local/bin:/usr/local/sbin:usr/local/lib;/usr/local/mysql/bin:$PATH"

and when I run echo $PATH now in terminal the directory is listed there.

Even so, I still get the same error message as above. Any solutions or pointing out what I'm missing are appreciated!

like image 687
JaKXz Avatar asked Jun 10 '12 23:06

JaKXz


2 Answers

Basically you need to set

"git_command": "/usr/local/git/bin/git"

in Packages/User/Git.sublime-settings or in Packages/Git/Git.sublime-settings

For more details have a look at this issue => https://github.com/kemayo/sublime-text-2-git/issues/96

like image 63
Usman Avatar answered Sep 21 '22 13:09

Usman


quoting directly from the link provided, I used a more recent fix that worked for me:

"git_command": "/usr/local/bin/"

best of luck!

like image 33
cpk Avatar answered Sep 24 '22 13:09

cpk