git verify-commit HEAD

Category: Git - Advanced

git verify-commit HEAD

Verify a commit's GPG signature

Checks the GPG signature on the named commit against the signer's key and reports whether it is valid. Commits that are not signed produce an error, which scripts can use as a gate. The -v flag prints the full commit contents alongside.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.