Yeah learned this the hard way.

  • sucoiri@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    24 hours ago

    Fun fact! If you added a file but never committed it you can still recover it with git fsck --lost-and-found. The changes were still added to the git object store, and by grepping through the dangling blobs you can find the object containing the changes you care about.