UPDATE – See comment #7 from Matt Parnell. His method seems to be a more elegant solution. You can set a shell variable for the git path within textmate.
I had some funky stuff going on in textmate when I was trying to search my project for a particular string. Textmate kept crashing, and then it gave me the option to reset my preferences (or something like that), so I chose “yes”. After I did this, everything seemed to be working fine except for Git. I kept getting this error:
Did a bit of searching and it appears that textmate was not able to see Git in its path. So the solution is to add a symbolic link in /usr/bin which points to the executable in /usr/local/git/bin/git
Here is what you need to do:
>ln /usr/local/git/bin/git git
Basically, this just adds a link to the git executable and Textmate is able to find it becuase /usr/bin is in its path.




Pingback: links for 2010-06-17 « Caiwangqin’s delicious bog
#1 by decal on August 2, 2010 - 11:21 pm
Quote
thanks! this was a life saver.
#2 by Richard on August 21, 2010 - 3:20 pm
Quote
I did the above but then, when I ran the command to update the cucumber bundle, I received this:
error: cannot open .git/FETCH_HEAD: Permission denied
Any suggestions?
#3 by cowboycoded on August 23, 2010 - 7:30 am
Quote
looks like you don’t have permissions in all the directories in you app. Either .git/ is owned by someone else or the permissions are too strict for your user.
sudo chown -R your_user:your_group /your_project
or
sudo chmod -R 744 /your_project
You may need different permissions than 744, if you don’t want everyone to have read access to that dir.
#4 by Steve on December 20, 2010 - 7:42 pm
Quote
Thanx for the post. I get the error ln: /usr/local/git/bin/git: No such file or directory when I run this command. git is installed in my /usr/local/bin/ directory. Anyhow, I’m getting the error when I run the get bundles bundle, although I am able to install bundles.
#5 by sordyl on February 8, 2011 - 2:13 pm
Quote
This only got me halfway there, I also had to:
$ cd ~/Library/Application\ Support/TextMate/Bundles
$ svn co http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/
and from TextMate select Reload Bundles from the Bundles → Bundle Editor menu.
#6 by cowboycoded on February 8, 2011 - 2:30 pm
Quote
@sordyl – thanks for the comment. I guess your git bundle was deleted?
#7 by Matt Parnell on April 27, 2011 - 4:25 am
Quote
Actually, they way the guys who made the Bundle suggest this:
In TextMate, got to Preferences, Advanced, Shell Variables
add this
variable: TM_GIT
value: /path/to/git
in this case the value = /usr/local/git/bin/git
#8 by cowboycoded on April 27, 2011 - 5:22 am
Quote
Thanks Matt! I like this method better. Post updated.
#9 by dougzilla on March 9, 2012 - 12:11 pm
Quote
Thanks Matt. This detail is so simple and so necessary.