我在我的热修复分支上,我只是做了git add。,并且git commit -m“添加了很好的风格”
然后我做了:
johns-mbp:blackjack johncurry$ git checkout master
Switched to branch 'master'
johns-mbp:blackjack johncurry$ git merge hotfix
Auto-merging views/stay.erb
error: cannot run Sublime_Text_2: No such file or directory
error: unable to start editor 'Sublime_Text_2'
Not committing merge; use 'git commit' to complete the merge.
johns-mbp:blackjack johncurry$ git commit -m "added well style"
[master 91c3bfd] added well style
然后我在我的主分支上推送到github,一切正常,就好像它成功合并一样,在github上,我甚至对热修复分支进行了更新,并且完全按照我想要的方式进行合并。以下部分对我来说是惊人的,这是怎么回事?如何摆脱它?
error: cannot run Sublime_Text_2: No such file or directory
error: unable to start editor 'Sublime_Text_2'
Not committing merge; use 'git commit' to complete the merge.
答案 0 :(得分:1)
您可能已将core.editor
配置变量(或环境变量GIT_EDITOR
)设置为Sublime_Text_2
。它应设置为subl -w
或subl -n -w
(取决于您是否希望Sublime打开新窗口)。 subl
是Sublime Text附带的命令行工具。
我的全局.gitconfig
文件的相关部分如下所示:
[core]
editor = subl -n -w
有关设置subl
的信息,请参阅http://www.sublimetext.com/docs/2/osx_command_line.html。