One can also use that, or just `git log -n1` and taking note of the commit hash. So many options.
Fun fact: you don't even need the `-n`. `git log -1` does the same thing, for any number.
-<number>, -n <number>, --max-count=<number>
Limit the output to <number> commits.
For scripting: git rev-parse HEAD
I do when I forget to run the git branch comment before. But I find it still hard to understand exactly which commit to reset to in the reflog.
The branch reflog (git reflog <branchname> or git log -g <branchname>) is a lot easier to follow in the case of rebase than the HEAD reflog (which gets an entry for each commit that gets checked out / applied).