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.
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.