当我进行交互式 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/