Github for windows just deleted all my files
Asked Answered
F

2

2

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!

Fluoroscope answered 12/4, 2014 at 4:23 Comment(1)
1. don't panic. You commit isn't lost completelyMoneybags
M
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

Moneybags answered 12/4, 2014 at 4:33 Comment(2)
I haven't dealt with the "github for Windows", and always thought that github is only the hosting for git repos and projects, but I'm sure it's just a shell for plain [old] git for Windows, so you may use it w/o any shell.Moneybags
The only output of 'git reflog' is: 40847ec HEAD@{0}: pull --progress --prune: Fast-forward 913f45e HEAD@{1}: rebase: updating HEAD 02c93d0 HEAD@{2}: rebase: aborting ....then the previous commits.... There are no local branches other than 'master'Fluoroscope
F
0

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 ?

Fluoroscope answered 12/4, 2014 at 6:14 Comment(1)
I would suggest you to use plain git. It's much more predictive :)Moneybags

© 2022 - 2024 — McMap. All rights reserved.