My most frequent git annoyance: I get a nice patch cued up with git add -p, edited hunks, the works. Then I accidentally blow away my index using `git commit -a` instead of `git commit`. Is there any way to recover the staged patch? This is surprisingly hard to google.

0

If you have a fediverse account, you can quote this note from your own instance. Search https://types.pl/users/wren6991/statuses/115555162234313999 on your instance and quote it. (Note that quoting is not supported in Mastodon.)