當試圖從Git包中爲TextMate使用某些命令時(例如'Show Uncommited Changes'),我收到一條錯誤消息, sh:第1行:git:command not found'。Textmate git命令失敗,'sh:line 1:git:command not found'
如何讓TextMate與Git協同工作?
當試圖從Git包中爲TextMate使用某些命令時(例如'Show Uncommited Changes'),我收到一條錯誤消息, sh:第1行:git:command not found'。Textmate git命令失敗,'sh:line 1:git:command not found'
如何讓TextMate與Git協同工作?
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。
@Radamanthus你不應該在命令行中運行「sh git」。你應該直接運行「git」。此外,你應該使用which命令(運行「哪個git」)來獲取你的git二進制文件的路徑(如@John Millikin所提到的)。
另外,一旦添加了TM_GIT var,就重新啓動TextMate。在沒有重新啓動的情況下更改首選項後,我沒有爲我工作。
嗯。它確實爲我工作。 – 2010-12-26 01:17:57
如果您已經允許git-osx-installer使混帳提供給非CLI應用(即它栽在/etc/paths.d/git文件),那麼你可以只..:
Untick the PATH shell variable set by default in the textmate preferences.
將你的git的位置添加到TextMate > Preferences... > Advanced > Shell Variables
中的PATH shell變量中。
我最近在Snow Leopard中遇到了同樣的問題,上面的解決方案都沒有出現在工作中。所以我在做/usr/bin
一個符號鏈接到我的git的可執行文件是這樣的:
cd /usr/bin
sudo ln -s `which git` git
然後重新啓動Textmate
和它的工作就像一個魅力,無需添加
你打是回答任何變量或什麼的。 – 2009-08-12 22:42:31
謝謝一堆,作品。 – Matthias 2009-10-19 09:23:09
PS:出於某種原因,我的同事在Snow Leopard上沒有遇到這個問題,開箱即用。 – Matthias 2009-10-19 09:23:45