Recover uncommitted changes

Deleting an uncommitted file is a rare yet painful event. Especially if we have spent a couple of hours working on it. It’s useful to know there’s a chance to recover the change. If the change has been staged we can find it as a dangling blob with git fsck1. Git will create a dangling blog every time we stage a change. So even if we remove a file or stage another change on top of the old one theoretically, we’ve got a chance to recover. ...

19 Jun 2024 · 2 min · 341 words