34

FUCK I stupidly did git reset --hard while having open changes.

Slap me

Comments
  • 0
    Relax, don't do anything, don't panic!

    Git reflog, some caution and googling and that should be possible to salvage.
  • 0
    @Arlekin even when I --hard it? 😂 I looked at reflog and googld
  • 0
    @liammartens
    Well, I don't make any promises, but i did have similar situation where I had tons of uncommited changes and resetted them in some way, and i managed to rescue that.

    Beside reflog there was some more obscure and arcane things involved IIRC, but if you google hard enough....
    Would help you, but im on my phone in a tram so I can't really do all that much.

    Don't make any commits or anything, just to not overwrite or hide anything.
    As i said, no promises but i wouldn't give up yet.
    Git can do amazing things
  • 2
    I was saved by 'undo' in Sublime IDE when the same has happened to me.
    i always have all tabs of the code of the ticket open.
  • 0
    Yeah, any editor with autosave, per chance?
  • 0
    @Arlekin @Gauthier a little updated, I am saved by Phalcon's caching 😄
  • 1
    In PHPStorm you could try the local history
  • 0
    @rkmaier I'm merely using a simple text editor héhé, but it's okay I got everything back now 😄

    (simple text editor = VS code)
  • 0
    @liammartens
    Im glad for you, whatever that thing is...
  • 0
    @bioDan I had exactly the same experience :-) gotta love sublime.
  • 2
    Local history of the IDE
  • 0
    in case of such fucked up moments, reach out to http://ohshitgit.com
Add Comment