我有一种不好的感觉,我的工作已经失传。有没有办法让他们回来?git stash:我的目录中的文件去哪里了?
这里是什么,我做了一个要点:
# Initially
$ git init -q
$ echo foo >foo
$ git add foo
$ git commit -m initial
[master (root-commit) 399ac4f] initial
1 file changed, 1 insertion(+)
create mode 100644 foo
# Work work work
$ rm foo
$ mkdir foo && echo bar >foo/bar
# This is where things went bad
$ git stash
Saved working directory and index state WIP on master: 399ac4f initial
HEAD is now at 399ac4f initial
$ git stash pop
Removing foo
# On branch master
# ...
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/[email protected]{0} (c8353a2223b73ceb9aa73fac64829919b68c86e9)
# What happened to my work!?
$ find foo
find: foo: No such file or directory
$ git --version
git version 1.7.11.3
Unfortulately,我不认为foo/bar
见过库/指数,因为我没有它在此之前运行任何git
命令。
*使用某种删除的文件恢复工具*似乎是最现实的选择。感谢您发送错误报告。干杯。 – antak 2012-07-31 00:57:25
刚用git 2.2.1发现了这种行为。任何想法这个bug的当前状态是什么?我能够在邮件列表中找到一些提及([1](http://article.gmane.org/gmane.comp.version-control.git/202332/match=11680453),[2](http:/ /article.gmane.org/gmane.comp.version-control.git/205540/match=git+stash+data+loss),[3](http://article.gmane.org/gmane.comp.version- control.git/229703/match = git + stash + data + loss)),但不是如何解决。 (除了邮件列表,项目是否有任何类型的错误跟踪器?) – doctaphred 2015-03-12 21:34:20