重新安装Windows后git stash无法正常工作

iFr*_*cht 5 windows git github

我最近重新安装了Windows。现在,在git stash我的任何github存储库上执行时,都会返回一条错误消息:

$ git stash
Cannot save the current worktree state
Run Code Online (Sandbox Code Playgroud)

这就是我得到的一切。尝试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")
Run Code Online (Sandbox Code Playgroud)

我确保在全局配置中将user.name和设置user.email为以前的值git loggit config user.name并使用和确认了这一点git config user.email

我该怎么做才能缓解这种情况?

Jij*_*ohn 1

我今天就陷入了这个问题。我使用的是 Windows 10 64 位操作系统,我的 Git 是 64 位。您可能还会看到在当前工作目录中创建了 sh.exe.stackdump 文件。

对我有用的解决方案:

我必须卸载 64 位 Git 并从https://git-scm.com/download/win安装 32 位 Git 。