加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

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

发布时间:2020-12-14 05:39:06 所属栏目:Windows 来源:网络整理
导读:我最近重新安装了 Windows.现在,当在我的任何github存储库上执行git stash时,会返回一条错误消息: $git stashCannot save the current worktree state 这就是我得到的一切.尝试git -v stash没有任何帮助,因为stash似乎没有详细模式.没有其他更改被隐藏,并且
我最近重新安装了 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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读