2009-08-12 105 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和它的工作就像一個魅力,無需添加

相關問題