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

时间:2017-08-18 20:25:11

标签: windows git github

我最近重新安装了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.nameuser.email设置为之前使用的相同值,然后使用git loggit config user.name和{{1}进行确认}。

我可以做些什么来缓解这种情况?

1 个答案:

答案 0 :(得分:1)

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

最适合我的解决方案:

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

相关问题