1
detailyang 2013-12-10 19:50:05 +08:00
坐等高人解答。。我知道总有一天我也会这样 = =。。因为最近直接rm了忘记提交的代码:(
|
2
wingoo OP update下, 所有新增的文件丢失, 修改的还在
用数据恢复软件, 检查项目目录, 没有记录.. |
3
9hills 2013-12-10 20:37:14 +08:00 via iPad
如果stage了是可以找回的,如果连git add 都没做。。。就杯具了
git一定要多commit 然后rebase写commit 另外工作区又没有commit的代码的时候是不能做很多操作的,想知道怎么更新的他人代码 |
4
wingoo OP |
5
9hills 2013-12-10 20:48:38 +08:00 via iPad 1
|
6
9hills 2013-12-10 20:50:21 +08:00 via iPad
|
8
wingoo OP @9hills 这是git status的输出, 运行git fsck --lost-found 没有找到丢失的文件...是不是杯具了,,
$ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: protected/controllers/SearchController.php # new file: protected/models/Search.php # # Changes not staged for commit: # (use "git add/rm <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working direct # # modified: README # deleted: protected/controllers/SearchController.php # deleted: protected/models/Search.php # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # .idea/ |
9
9hills 2013-12-10 21:51:20 +08:00 via iPad
只要add过肯定能找回的 fsck 出来的文件名都变了,耐心找
|
10
wingoo OP @9hills 是只执行 git fsck --lost-found 这个操作吗?
恢复出来就几个文件, 没个都看了.. 不是 |
11
wingoo OP @wingoo 我运行 git fsck --cache --no-reflogs --lost-found --unreachable HEAD
后有一堆文件出啦, 但没有输出到lost-found文件夹 类似 Checking object directories: 100% (256/256), done. Checking objects: 100% (10613/10613), done. unreachable tree 018098c43dcbd321dd904d8d274b0a1cdd6cff02 unreachable blob 8100e5dd835d1a9331dde246347cf4fac73d7655 unreachable blob 9d00d90fe12bc079e3a97eac906dea47a862a190 unreachable commit 08c1e8b48bb4fb2a15bd0675cafdb757b21aa590 unreachable blob 0d4145d4e0ba97fca67bc865a4c5bb3a76bef5ce 尝试打开了几个, 发现有几个丢的文件, 有没有办法全部输出到文件夹去? 谢谢 |