Github for windows刚刚删除了我的所有文件 [英] Github for windows just deleted all my files

查看:75
本文介绍了Github for windows刚刚删除了我的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我只是想尽一切努力做好这件事,并将我的工作备份到github上,因为我在几个星期内没有做过提交工作。

我打开回购站,然后做了一个提交。



当我点击同步时,它会从磁盘上删除所有138个新文件,并在一个多月前重置为上次提交。它还覆盖了所有使用旧版本修改的现有文件。



我没有备份...这应该是fscking备份。



是否有一些magic git命令可以撤消这个shitstorm,或者我需要尝试使用文件取消删除工具来恢复新文件?



git reflog输出:
40847ec HEAD @ {0}:pull --progress --prune:快进
913f45e HEAD @ {1}:rebase:更新HEAD
02c93d0 HEAD @ {2}:rebase:放弃
02c93d0 HEAD @ {3}:commit:< - 上次提交良好



请帮忙!

解决方案

尝试调用 git reflog 。它应该显示最近提交的列表。你可以使用 git branch MyHappyBackUp< sha1> 其中< sha1> 是来自 git reflog 。如果您没有安装纯粹的git,请尝试此版本


I just tried to do the dutiful thing and backup my work to github, since I had not done a commit in a few weeks due to working on a large work area.

Github for windows notified me it needed to download the latest update and it did so.

I opened the repo, then did a commit.

When I hit sync, it deleted all 138 new files from disk and reset to the last commit more than a month ago. It also overwrote all existing files that were modified with the old version.

I have no backup... this was meant to be the fscking backup.

Is there some magic git command to undo this shitstorm, or will I need to try recover the new files with a file undelete tool ?

git reflog output: 40847ec HEAD@{0}: pull --progress --prune: Fast-forward 913f45e HEAD@{1}: rebase: updating HEAD 02c93d0 HEAD@{2}: rebase: aborting 02c93d0 HEAD@{3}: commit: <-- last good commit

Please help!

解决方案

Try to invoke git reflog. It should show you the list of recent commits. The you may use git branch MyHappyBackUp <sha1> where <sha1> is one of those commits from git reflog. If you don't have "plain git" installed, try this build

这篇关于Github for windows刚刚删除了我的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆