On Tuesday, September 3, 2013 10:34:38 PM UTC+2, Ling wrote:

> Hello,
>  
> I'm kinds of new on Git and now we are trying to get the hooks enabled 
> into one of our server repository, what we want this hooks doing is to 
> prevent when local users that push the changes from their local repo to 
> server repo, we need to first check the commit comments to see if it 
> include some specific words, (i.e. 999). so what I tried is created an 
> update hooks with compare the git log, but looks like this won't works 
> correctly since this is only check the previous pushed comments. so I 
> believe I will need to use pre-receive hook, but here is my quesiton? What 
> is the basic flow for pre-receive hook for me to compare the local push 
> commets with server existing comments?
>

You're looking for the pre-receive or update hook. Read through 
http://git-scm.com/book/en/Customizing-Git-Git-Hooks#Server-Side-Hooks 

Here's an example showing inspection of the commit 
message: 
http://stackoverflow.com/questions/2524101/git-how-do-we-verify-commit-messages-for-a-push

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to