In the fugitive summary buffer, the powerful X
command does as explained in :help fugitive_X
:
Discard the change under the cursor. This uses
checkout
orclean
under the hood. A command is echoed that shows how to undo the change. Consult:messages
to see it again. You can use this during a merge conflict do discard "our" changes (--theirs) in the "Unstaged" section or discard "their" changes (--ours) in the "Staged" section.
I used X
mistakenly then closed Vim because I was in a hurry. I had 5 changed files in the repository and I'm a bit sad to have lost those changes. It's a note taking repository with the effort of a few days (I know I should have committed earlier, it's not my main work, just notes on the side). A help hint in the message bar says to use the following to recover one file. I tested and managed to recover it.
:Gsplit art/music.md|Gread 124cdf331a4
Can I recover the other files checked out before that test? I didn't see the message back then and :message
only prints message for the active vim session. How do I find out about fugitive messages printed in previous sessions? What are those hash numbers?