7

It's been so long since I used git I accidentally nuked my commit and only copy of client code during a revert.

How the fuck does anyone mess up that badly? 😅

Comments
  • 6
    By not RTFM I guess.. And believing to know 'better' 😁
  • 3
  • 4
    By using -f
  • 3
    git push master -force

    Who knew that would be a potentially bad thing to do?

    There are times you "can" use force, but you should understand wtf you're about to do and the repercussions of you're actions are.
  • 3
    Lost commits can still be retrieved from the reflog or even without it if you have a hash in some file or even the buffer of an open terminal. Eventually it'll sweep out all the unreferenced objects though so I'd hurry.
  • 0
    @Lor-inc you know you're amazing sometimes?

    I thought it was gone for good.

    Guess I'll go digging.
  • 1
    @C0D4 --force-with-lease
  • 1
    @Wisecrack Don't thank me, thank @gitreflog
Add Comment