Git - 为什么我会收到错误“subl -n -w:subl:command not found”? [英] Git - Why am I getting the error "subl -n -w: subl: command not found"?

查看:1132
本文介绍了Git - 为什么我会收到错误“subl -n -w:subl:command not found”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



  subl -n -w:

每次当我合并dev分支与我的本地分支时, subl:command not found
错误:编辑器'subl -n -w'出现问题。
不提交合并;使用'git commit'来完成合并

即使关闭Sublime Text,我也会收到此错误我不确定它是否抱怨崇高。有没有人知道如何避免或修复这个错误? 解决方案

你的git编辑器没有正确配置。你必须给完整路径同时配置你的git编辑器。



对于 Sublime text 3 ,使用以下命令:

  git config --global core.editor''C:/ Program Files / Sublime Text 3 / subl'-n -w
pre>

如果您有 Sublime text 2 ,请使用以下命令:

  git config --global core.editor''C:/ program files / sublime text2 / sublime_text.exe'-n -w


Everytime when I am merging dev branch with my local branch I get the following error:

subl -n -w: subl: command not found
error: There was a problem with the editor 'subl -n -w'.
Not committing merge; use 'git commit' to complete the merge

I am getting this error even when Sublime Text is closed however I am not sure if it's complaining about Sublime. Does anyone know how to avoid or fix this error?

解决方案

Your git editor has not configured properly.You have to give full path while configuring your git editor.

For Sublime text 3 use following command-

git config --global core.editor " 'C:/Program Files/Sublime Text 3/subl' -n -w"

If you have Sublime text 2 use following command-

git config --global core.editor " 'C:/program files/sublime text2/sublime_text.exe' -n -w" 

这篇关于Git - 为什么我会收到错误“subl -n -w:subl:command not found”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆