You can use the git var command:
git var GIT_COMMITTER_IDENT
It can be run outside of any Git workspace, prints committer information in the format name <email> timestamp timezone and uses the same Git code that also runs when committed, therefore respects configuration keys and environment variables. Depending on what you want to do with this information, you may need to filter out the timestamp and time zone.
user743382
source share