git - 交互式 git rebase 失败,返回 "git-rebase-todo: No such file or directory"

标签 git cygwin rebase

当我进行交互式 git-rebase 时:

git rebase -i HEAD~2

它显示:

C:\GnuWin32\bin\grep.exe: /cygdrive/xxx/.git/rebase-merge/git-rebase-todo: No such file or directory Nothing to do

(xxx为项目路径)

但是 git rebase branch_xxx 正在工作。

我确定之前没有进行任何 rebase(检查 git rebase --abort 并同时使用干净的项目文件夹)

有人解决了吗?我用谷歌搜索了它,但没有找到有用的提示。

最佳答案

我的问题是由于我的 gitconfig 缺少 -w 和 -n 标志:

[core]
    editor = sublime -w -n

来自 Code Project :

[The -w and -n arguments are] passed to Sublime Text, and essentially tell it to run without loading any previously open windows (the –n flag), and to wait until the user exits to pass execution back to the calling process (the –w flag, for "wait")

关于git - 交互式 git rebase 失败,返回 "git-rebase-todo: No such file or directory",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17140570/

相关文章:

git - 无法推送到 bitbucket 403 "authentication failed"

Git:从 pull 请求中排除提交的文件

git - 我怎样才能保持我的博客 git 存储库干净?

c - 如何在cygwin下AllocConsole + Stdout重定向

git - `git rebase` 没有更新分支?

git commit 打破时区

Git fork 版本礼仪

character-encoding - sqlite3:无法自动识别查询文件的UTF-8编码

linux - 哪些是特定于 Linux 的 Hadoop 内部结构?

git - 如何根据每次提交的日期将两个分支 merge 为一个分支?