Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How I can run a script when somebody merges branch "test" into "stable" ?

In other words, I want to run a script after the stable branch is updated.

share|improve this question
    
your question means nothing! Provide more information so we can help you. –  JamesK Nov 12 '10 at 12:13
    
Question updated –  astropanic Nov 12 '10 at 12:29

1 Answer 1

Depends on the purpose of your hook.

You could be running it when changes to stable are published to a reference repository, or when they are being prepared on a developer's local repository. You could be running it before the commit, to be able to prevent it, or after, to only be notified of commits that took place.

Anyway, look at git help hooks. The hook script might look at HEAD and MERGE_HEAD or use git log -n1 with a custom format.

share|improve this answer

Your Answer

 
discard

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.