【发布时间】:2020-06-18 18:34:36
【问题描述】:
当我尝试git rebase 时,我看到以下内容:
Cannot rebase: You have unstaged changes.
Please commit or stash them.
当我尝试git status 时,我看到以下内容:
On branch xxx
nothing to commit, working tree clean
我已经尝试过git reset、git clean -fd 和git checkout .
我还能尝试什么?
【问题讨论】:
-
您之前是否在任何文件上运行过
git update-index --assume-unchanged或git update-index --skip-worktree?试试git ls-files -v | grep -e '^h' -e '^S'找出来。 -
不,我没有运行这些命令。我试过你的
git ls-files命令,它什么也没返回。我尝试运行git ls-files -v,似乎所有文件都是H。 -
是否有任何文件在当前分支上被忽略并存在于工作树中但在新的基础上提交?
-
我试过
git rebase -i HEAD~1,但它也失败了,我最后一次提交肯定没有引入任何被忽略的文件。
标签: git git-rebase