gpt4 book ai didi

windows - Windows 重新安装后 git stash 不工作

转载 作者:可可西里 更新时间:2023-11-01 13:46:15 24 4
gpt4 key购买 nike

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

$ git stash
Cannot save the current worktree state

这就是我得到的一切。尝试 git -v stash 没有帮助,因为 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 log< 确认了这一点git config user.namegit config user.email

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

最佳答案

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

对我有用的解决方案:

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

关于windows - Windows 重新安装后 git stash 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45764583/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com