2014-10-06 40 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

相關問題