2014-10-06 173 views
0

每当我从主站拉,git不会自动提交更改到我的本地分支。我得到以下错误:git不会自动提交,因为某些原因,我拉

/usr/bin/mate -w: /usr/bin/mate: No such file or directory 
error: There was a problem with the editor '/usr/bin/mate -w'. 
Not committing merge; use 'git commit' to complete the merge. 

我必须在提取后手动执行提交。这只是从我设置新机器开始,从未发生在我的旧机器上。任何帮助表示赞赏。

+1

你已经安装了文本伴侣吗? – aharris88 2014-10-06 19:08:51

+2

你看过错误信息吗? Git找不到你的文本编辑器(TextMate)。确保它已经安装好,并且'mate'在你的路上。 – Jubobs 2014-10-06 19:09:03

+0

@Jubobs所有这些完整的路径让我觉得它不是'$ PATH'问题​​。 – Biffen 2014-10-06 19:15:12

回答

3

我可以重现你的问题,如果我把一些玩具的本地库我的核心编辑器,像这样

git config core.editor "/usr/bin/mate -w" 

,然后尝试运行使用编辑器的命令:

$ git commit 
/usr/bin/mate -w: /usr/bin/mate: No such file or directory 
error: There was a problem with the editor '/usr/bin/mate -w'. 
Please supply the message using either -m or -F option. 

我m得到这个错误,因为我的机器上没有文件或目录/usr/bin/mate(我没有安装TextMate)。

你得到一个类似的错误类似的原因:要么TextMate的是安装在你的机器上而不是在/usr/bin/mate,或者它根本没有安装。你应该要么

  1. 使用已经安装在你的机器上的文本编辑器;或者,
  2. 如果您坚持使用TextMate,请确保它实际上已安装;然后运行

    git config core.editor "<path_to_mate> -w" 
    

    另外,添加mate到您的路径,并简单地运行

    git config core.editor "mate -w" 
    
+0

我使用Ruby矿作为我的文本编辑器我没有安装任何文本内容 – 2014-10-09 19:10:28

+1

您是否使用RubyMine作为您的旧机器上的Git编辑器?我不认为Git允许你使用IDE作为它的核心编辑器。 – Jubobs 2014-10-09 19:16:51

+1

或者你的意思是说你在RubyMine中使用Git? – Jubobs 2014-10-10 20:37:49

相关问题