Siging Commit¶
Overview¶
What is it? It is about the confirmed mation of commit
Tips:
To configure your Git client to sign commits by default for a local repository, in Git versions 2.0.0 and above, run git config commit.gpgsign true. To sign all commits by default in any local repository on your computer, run git config --global commit.gpgsign true.
To store your GPG key passphrase so you don't have to enter it every time you sign a commit, we recommend using the following tools:
For Mac users, the GPG Suite allows you to store your GPG key passphrase in the Mac OS Keychain. For Windows users, the Gpg4win integrates with other Windows tools. You can also manually configure gpg-agent to save your GPG key passphrase, but this doesn't integrate with Mac OS Keychain like ssh-agent and requires more setup.
# $ git commit -S -m "YOUR_COMMIT_MESSAGE"
# # Creates a signed commit
# If you're using GPG, after you create your commit, provide the passphrase you set up when you generated your GPG key.
Practice¶
https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits