Interview Prep/Git & GitHub/Hooks, submodules, LFS and signing

Why sign commits and what are the options?

BeginnerConceptHooks, submodules, LFS and signing
Answer

Author name and email are just text and can be forged, so signatures prove who made a commit. Options are GPG, SSH keys (Git 2.34+) and Sigstore gitsign (keyless). GitHub shows a Verified badge when the signature matches a key on the account.

git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global commit.gpgsign true
All Git & GitHub questions Roadmap: Git & GitHub

More on Hooks, submodules, LFS and signing