Skip to content

bluef/gith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gith

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. :)

Installing Gith

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.

pre-receive

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.

post-receive

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.

post-merge

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.

About

some git hook scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published