2009-08-12 57 views

回答

48

http://theappleblog.com/2008/01/09/textmate-no-longer-a-reason-to-avoid-git/

Set the TM_GIT shell variable in the textmate preferences to your git executable to work to solve the command not found problem.

要找到你的git的二进制文件,键入路径 “这混帐” 在命令行上。当然,确保安装Git。

+1

你打是回答任何变量或什么的。 – 2009-08-12 22:42:31

+0

谢谢一堆,作品。 – Matthias 2009-10-19 09:23:09

+0

PS:出于某种原因,我的同事在Snow Leopard上没有遇到这个问题,开箱即用。 – Matthias 2009-10-19 09:23:45

0

@Radamanthus你不应该在命令行中运行“sh git”。你应该直接运行“git”。此外,你应该使用which命令(运行“哪个git”)来获取你的git二进制文件的路径(如@John Millikin所提到的)。

1

另外,一旦添加了TM_GIT var,就重新启动TextMate。在没有重新启动的情况下更改首选项后,我没有为我工作。

+1

嗯。它确实为我工作。 – 2010-12-26 01:17:57

3

如果您已经允许git-osx-installer使混帐提供给非CLI应用(即它栽在/etc/paths.d/git文件),那么你可以只..:

Untick the PATH shell variable set by default in the textmate preferences. 
0

将你的git的位置添加到TextMate > Preferences... > Advanced > Shell Variables中的PATH shell变量中。

2

我最近在Snow Leopard中遇到了同样的问题,上面的解决方案都没有出现在工作中。所以我在做/usr/bin一个符号链接到我的git的可执行文件是这样的:

cd /usr/bin 

sudo ln -s `which git` git 

然后重新启动Textmate和它的工作就像一个魅力,无需添加

相关问题