我最近重新安装了
Windows.现在,当在我的任何github存储库上执行git stash时,会返回一条错误消息:
$git stash Cannot save the current worktree state
这就是我得到的一切.尝试git -v stash没有任何帮助,因为stash似乎没有详细模式.没有其他更改被隐藏,并且只有一个修改过的文件:
$git stash list $git status On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: storage.h no changes added to commit (use "git add" and/or "git commit -a")
我确保将我的全局配置中的user.name和user.email设置为与之前相同的值,并使用git log,git config user.name和git config user.email进行确认.
我该怎么做才能缓解这种情况?
解决方法
我今天遇到了这个问题.我使用的是Windows 10 64位操作系统,我的Git是64位.您可能还看到在当前工作目录中创建了sh.exe.stackdump文件.
对我有用的解决方案:
我不得不卸载64位Git并从https://git-scm.com/download/win安装32位Git.