title: How can I discover the git commit hash that I stashed from?
body: <p>I realize that my question is very similar to <a href="https://stackoverflow.com/q/28590735/470749">How to list the parent commit of a stash in `git stash list`</a> and <a href="https://stackoverflow.com/questions/16071720/get-git-stash-parent-commit">Get git stash parent commit</a>, but those had so many confusing, disparate responses that I'm asking my own question.</p>
  <p>Let's assume that if I run <code>git stash list</code>, I see <code>stash@{0}: On featureX: someMessageHere</code></p>
  <p><strong>How can I reveal the hash of the commit that I was working from when I made that stash (which I guess could be considered a parent commit)?</strong></p>
  <p>I've seen so many different answers, and I'm confused about what these each do, how they are different, and which one is the answer to my question:</p>
  <ul>
  <li><code>git show stash@{1}^</code></li>
  <li><code>git log -1 commitish^</code></li>
  <li><code>git log -1 stash@{0}^</code></li>
  <li><code>git log -g --no-walk --parents refs/stash</code></li>
  <li><code>git for-each-ref --format='%(refname:short)' --points-at $(git rev-parse refs/stash~1) refs/heads</code></li>
  </ul>
  <pre><code>git log -g --format=&quot;%gd %H&quot; refs/stash |
  while read name hash; do
      printf &quot;%s %s &quot; $name $(git rev-parse --short $name^)
      git log -1 --format=%s $hash
  done
  </code></pre>
  <p><sub>For extra context, <a href="https://stackoverflow.com/questions/62840077/how-to-recover-from-git-added-by-us-conflict-after-applying-stash-after-renami/62842712#comment111147132_62842712">this is the reason I'm asking</a>.</sub></p>