A collection of git hook scripts that I use for improving productivity in daily works as the administrator of a repo. I just start learning Python for writing all these scripts so they look not so good. :)
After downloading the source from Github, you need to modify your sshd_config file:
/etc/ssh/sshd_config
Set the value of PermitUserEnvironment to yes
And in the authorized_keys file, please add the environment variables to the beginning of each key for identifying the user.
environment="GIT_USER=your-name-here" ssh-rsa...
Then copy all the scripts to the .git/hooks directory, also make them executable.
This script will help you restrict the access of the user. That means you can specify the branches some user has access to. For example, userA only has access to branchA, when userB has access to both master and branchB. This script need the acl file to work with. Format of acl file is included in it.
This script will be triggered after someone pushing changes to the server. It will send an email to you with the list of modified files.
This script will be triggered after the administrator merge works in other developer's branch into master. It will send an email to developers with the list of modified files.