title: Why are my changes gone after a cancelled git commit and how do I recover them?
body: <p>Here's what I did:</p>
  
  <ol>
  <li>Coded 8 hours worth of changes.</li>
  <li><code>git status</code> displays all my changes.</li>
  <li><code>git add -A</code></li>
  <li><code>git commit -m "Foo"</code>. A pre-commit git hook fires with <code>husky</code> and <code>lint-staged</code>.</li>
  <li>I remember that there's a TypeScript typing error I failed to fix, so I press Ctrl+C to cancel.</li>
  <li>Absentmindedly, I run <code>git commit -m "Foo"</code> again and immediately cancel.</li>
  <li>Changes are gone! The files are reverted, <code>git status</code> is clean, <code>git log</code> and <code>git reflog</code> do not show a new commit.</li>
  </ol>
  
  <p>Why did my changes get reverted? How do I recover them?</p>
  
  <p><a href="https://i.stack.imgur.com/s5FKO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/s5FKO.png" alt="step 1"></a> <a href="https://i.stack.imgur.com/GbxCm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GbxCm.png" alt="step 2"></a></p>