I have a central bare repository in which a team publish (push) their commits.
In this main repository, I want to disable the tag deletion and renaming.
Is there a solution like a hook or something ?
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.
git help hookscontains documentation about the hooks. Theupdatehook is invoked when Git is about to create/move/delete a reference. It is called once per reference to be updated, and is given:If the hook exits with a non-zero exit code,
gitwon’t update the reference and the user will get an error.So to address your particular problem, you can add the following to your
updatehook: