当试图从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