Yeah learned this the hard way.

you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 1 year 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.

  • source
  • parent