Hooks handling for git