The exact name of a Git setting is easy to forget, while a piece of it sticks. Scrolling through git config --list works, but there is a shorter way to search.
git config --get-regexp '^user\.'
The pattern is matched against the key, not the value, and every match comes out as key value. Quote the pattern so your shell leaves it alone. Handy ones are alias to list your aliases, ^remote\. to see all remotes, or color to find every colour setting.
One thing can look odd. The same key can show up twice, once from the global config and once from the repository’s local config. Git prints each value it finds, in order, and the later one wins. To see which is which, add --show-scope:
git config --get-regexp --show-scope '^user\.(name|email)$'
That puts global or local in front of each line. If you want the file path instead, --show-origin does that.
Caveat: when nothing matches, the command prints nothing and exits with status 1, so it isn’t an error message you’d notice by eye. It’s also handy to know that the output can include sensitive things like a signing key path or a credential helper, so look before you paste it into a bug report.
Further reading: git-config documentation
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more