How to verify signed commits in Git

Verifying signed commits ensures the authenticity of code contributions and maintains security in collaborative projects. As the creator of CoreUI, a widely used open-source UI library, I’ve enforced commit signing in enterprise repositories throughout my 25 years of development experience. The most straightforward method is using git log --show-signature to display GPG signature verification status for each commit. This approach provides clear indication of whether commits are properly signed and verified.

Use git log with the –show-signature flag to verify signed commits.

git log --show-signature

Here the --show-signature flag displays GPG signature information for each commit in the log. Verified commits show “Good signature from” followed by the signer’s name and email. Unverified or unsigned commits display either no signature information or “Bad signature” warnings. You can also use git verify-commit <commit-hash> to check a specific commit’s signature validity.

Best Practice Note:

This is the same verification process we recommend for CoreUI enterprise projects requiring strict code authenticity. Configure Git to reject unsigned commits in protected branches using server-side hooks, and ensure all team members have properly configured GPG keys to maintain consistent signing across the repository.


Speed up your responsive apps and websites with fully-featured, ready-to-use open-source admin panel templates—free to use and built for efficiency.


About the Author

Subscribe to our newsletter
Get early information about new products, product updates and blog posts.
How to migrate CoreUI React Templates to Vite
How to migrate CoreUI React Templates to Vite

How to check if an array is empty in JavaScript?
How to check if an array is empty in JavaScript?

How to change opacity on hover in CSS
How to change opacity on hover in CSS

How to check if a key exists in JavaScript object?
How to check if a key exists in JavaScript object?

Answers by CoreUI Core Team