git 中的两个分支之间尝试递归合并时出错
Having errors during attempted recursive merge between two branches in git
Having errors during attempted recursive merge between two branches in git
Abhinavs-MBP:src Akurada$ git branch --no-merged
master
Abhinavs-MBP:src Akurada$ git checkout master
Switched to branch 'master'
Abhinavs-MBP:src Akurada$ git branch --no-merged
add-scoring
Abhinavs-MBP:src Akurada$ git merge add-scoring
error: There was a problem with the editor 'vi'.
Not committing merge; use 'git commit' to complete the merge.
Abhinavs-MBP:src Akurada$ git merge add-scoring
fatal: You have not concluded your merge (MERGE_HEAD exists).
Please, commit your changes before you merge.
你的系统路径里有vi吗?使用 git 的配置
设置编辑器
core.editor
默认情况下,Git 使用您设置为默认文本编辑器的任何内容($VISUAL 或 $EDITOR),或者退回到 vi 编辑器来创建和编辑您的提交和标记消息。要将该默认值更改为其他值,您可以使用 core.editor 设置:
$ git 配置 --global core.editor emacs
现在,无论将什么设置为默认 shell 编辑器,Git 都会启动 Emacs 来编辑消息。
Having errors during attempted recursive merge between two branches in git
Abhinavs-MBP:src Akurada$ git branch --no-merged
master
Abhinavs-MBP:src Akurada$ git checkout master
Switched to branch 'master'
Abhinavs-MBP:src Akurada$ git branch --no-merged
add-scoring
Abhinavs-MBP:src Akurada$ git merge add-scoring
error: There was a problem with the editor 'vi'.
Not committing merge; use 'git commit' to complete the merge.
Abhinavs-MBP:src Akurada$ git merge add-scoring
fatal: You have not concluded your merge (MERGE_HEAD exists).
Please, commit your changes before you merge.
你的系统路径里有vi吗?使用 git 的配置
设置编辑器core.editor 默认情况下,Git 使用您设置为默认文本编辑器的任何内容($VISUAL 或 $EDITOR),或者退回到 vi 编辑器来创建和编辑您的提交和标记消息。要将该默认值更改为其他值,您可以使用 core.editor 设置:
$ git 配置 --global core.editor emacs 现在,无论将什么设置为默认 shell 编辑器,Git 都会启动 Emacs 来编辑消息。