【发布时间】:2013-08-31 01:41:35
【问题描述】:
Git pull 命令运行正常,但 git stash 出现以下错误:
$git stash
error: unable to resolve reference refs/stash: No such file or directory
fatal: Cannot lock the ref 'refs/stash'.
Cannot save the current status
如何解决这个问题,以免丢失我的更改?
【问题讨论】:
-
你的用户是否有
.git/.git/refs目录的写权限? -
你使用的是什么操作系统和git版本?
-
git 版本 1.7.9.5,Linux 操作系统。 .git 和 .git/refs 具有读取和执行权限
-
@schipitch: 必须能写入目录,否则无法创建文件
-
@knittl 我使用 git 已经有一段时间了,它一直在使用相同的权限,直到今天才发生此错误。