You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行git rebase -i时提示无法启动interactive-rebase-tool的问题求助

解决Git rebase -i报错"cannot spawn interactive-rebase-tool: No such file or directory"

你的问题出在Git的rebase.editor配置被错误设置成了不存在的interactive-rebase-tool,而提交操作使用的是全局core.editor配置(也就是你正在用的Vim),所以提交正常但交互式变基失败。按以下步骤修复:

  • 先检查当前rebase编辑器配置:

    git config --get rebase.editor
    

    如果输出是interactive-rebase-tool,确认配置错误。

  • 重置rebase编辑器为全局默认(即你的Vim):

    git config --unset rebase.editor
    
  • 如果上面的命令不生效,手动指定rebase编辑器为Vim:

    git config --global rebase.editor vim
    
  • 验证配置是否生效:
    再次执行git config --get rebase.editor,输出应为vim或为空(为空时Git会使用全局core.editor的设置)。

完成后重新运行git rebase -i,就能正常弹出Vim编辑器了。

内容的提问来源于stack exchange,提问作者Noah Tang

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.28 09:35:01