Github for windows just deleted all my files

感情迁移 提交于 2019-12-01 11:24:44

问题


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!


回答1:


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




回答2:


OK, it is 2 hours later, I just loaded github for windows (again), and my commit is magically there.... still not sync'd though.

WTF ? Are large commits done asynchronously and then the GUI does not know about them till they are finished or something ?



来源:https://stackoverflow.com/questions/23026067/github-for-windows-just-deleted-all-my-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!