git just nuked about 4 hours of work. I had a bunch of stuff in the staging area... then I typed git cherry-pick --abort and it straight up deleted my staging. wow. reflog can't help me because I didn't commit. fml.
Discussion
Damn that’s rough… RIP
🫂
Ouch. Sucks
Down bad
My condolences. Hammer it back out quick, though! Sucks to do it twice, but I’ve had it take a quarter the time and be structured better the second time.
At least you’ve got another 4.5 to make it up? 🤷♀️😢
Check your editor for local history. VS Code an do a pretty good job of tracking that stuff, same with Jet Brains products.
🫂
This is karma for the other time you got 4 extra hours worth of work done faster than god thought you would
noob
shit, sorry Will :(
should have used mercurial
`git fsck --lost-found` probably still has your files as `git show`-able blob objects, potentially in a haystack of other old, dangling objects. Tedious to recover, but they're probably there. 🤷♂️
yeah now that I think of it... staging it should have written a git tree... oh well. I've already rewrote it
some IDEs store local history in itself that you can revert to. helped me out a few times already.
I as a rule don’t use git directly like that.
I creat functions that stash first and take the desired action
vim recently had my back when I rm a file prematurely. I recreated the file with the same name and then did an undo and the blank document became the last saved version.
Hopefully undotree or mundo is a part of your stack