Copying hashes around gets old. Git lets you point at a commit by a bit of its message, with a colon and a slash.
git show ':/fix login'
:/ followed by text means “the youngest commit whose message matches this regular expression”, searched from all your refs. It works anywhere git expects a commit, so you can use it with other commands:
git cherry-pick ':/Add export button'
git diff ':/release 2.3' HEAD
Quote it, because the text often contains spaces, and some shells have their own ideas about the colon and exclamation mark.
There’s a variant that searches from a specific branch: main^{/fix login} looks for the newest matching commit reachable from main. I prefer that one when the same words appear on several branches.
A leading exclamation mark has a special meaning. :/!-foo means “message does not match foo”, and :/!! stands for a literal exclamation mark. That’s rarely what you want by accident, so avoid starting your search text with one.
The search picks only one commit, the newest match. If you have five commits that say “fix login”, you get the last one, which may not be the one you meant. Run git show -s on it first to check before you cherry-pick or reset anything.
Further reading: gitrevisions documentation