Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a git repo on a server. I would like to run a update hook on this when a push is done.

I am unable to get git revlist or take any information from the user because i can't enable tty.

I have written the hook in python. I would like it so I can retrieve commit history from my local repo and use that information in the process of my update hook, which checks for pattern in commits.

the problem i am having is that when i run the command from my script it is being executed on my server.

Please any advice would really be appreciated.

share|improve this question

have you tried running this in your post-receive hook script?

GIT_DIR=/path_to_repo/project.git git log branch_you_just_pushed

are your trying to do something like Using Git to manage a web site?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.