开发者

Git rebase --continue opens editor

After a rebase failed with a conflict, I could not continue the rebas开发者_开发知识库e using a Git GUI client. When performing

git rebase --continue

on command line (msysgit 1.7.4), it opened a text editor. After having closed it, Git continued. How can opening the editor be avoided?


When a rebase fails, you have to manually fix the file and then exec git add filename to signal that everything is OK. At this point, git rebase --continue will continue the procedure without bothering you.

To change the default editor git uses issue: git config --global core.editor new_editor

Commands such as commit and tag that lets you edit messages by launching an editor uses the value of this variable when it is set, and the environment variable GIT_EDITOR is not set. See git-var(1).


When a rebase incurs in conflicts, the user may need to make notable changes for resolving the them. Git assumes that the user wishes to modify the commit message, commenting on the conflict resolution.

This is documented in the paragraph Commit Rewording of the git rebase man page.

A way to prevent the editor from being opened, and to confirm the original commit message is the following:

$ GIT_EDITOR=true git rebase --continue
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜