Git rebase --继续打开编辑器
变基因冲突而失败后,我无法使用 Git GUI 客户端继续变基。 执行时
git rebase --continue
在命令行(msysgit 1.7.4)上 ,它打开了一个文本编辑器。关闭它后,Git 继续。如何避免打开编辑器?
After a rebase failed with a conflict, I could not continue the rebase 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当变基失败时,您必须手动修复文件,然后执行 git add filename 来表明一切正常。此时,
git rebase --Continue
将继续该过程,而不会打扰您。要更改默认编辑器 git 使用问题: git config --global core.editor new_editor
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
当变基发生冲突时,用户可能需要做出显着的更改来解决冲突。 Git 假设用户希望修改提交消息,对冲突解决方案进行评论。
这记录在
git rebase<的提交改写段落中/code> 手册页。
防止打开编辑器并确认原始提交消息的方法如下:
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: