I can't find any clear examples of Git hooks for Windows. I use Bonobo Git Server on Windows Server. I need pre-commit and post-commit hooks as cmd or bat. Pre-commit should check empty comments and post-commit should send an e-mail notification about commit. May be somebody has similar hooks and ready to share?
After some experimenting I found out that
#!/Git/sh
echo This is the receive-hook >> result.txt
in
C:\inetput\wwwroot\Bonobo.Git.Server\App_Data\Repository\<your repository>\hooks\receive-hook
Was executed on a remote
git push
Then you can call a batch like
#!/Git/sh
cmd //C "post-receive.cmd"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With