git

git hooks on windows

In $GIT_DIR/hooks/* (typically in <repository_root>/.git/hooks/*) you may place scripts, which execute as you perform specific git operations on your repository. For more info on how to name the hooks and when exactly they are executed, type in git help hooks in your console.

However, you are not able to use commands you know from .cmd and .bat files. Instead, place this in your hook (for example post-checkout):

cd ./.git/hooks
start post-merge.cmd

now post-merge.cmd (placed in the same folder as the hooks) is called and executed by the hook.

Leave a Reply

Your email address will not be published. Required fields are marked *