Is there a way to protect a given git commit from being amended?
All I can think to do is to write a pre-commit hook to check the SHA against a list of ‘non-amendable’ SHAs. Does anyone know of a standard/better way?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can consider signing your commit with a GPG key.
In order to do so
Add your GPG key as a signing key
Commit using the
-Soption