经过一些实验我发现
#!/Git/sh
echo This is the receive-hook >> result.txt
Run Code Online (Sandbox Code Playgroud)
在
C:\inetput\wwwroot\Bonobo.Git.Server\App_Data\Repository\<your repository>\hooks\receive-hook
Run Code Online (Sandbox Code Playgroud)
在远程执行
git push
Run Code Online (Sandbox Code Playgroud)
然后你可以像这样调用一个批处理
#!/Git/sh
cmd //C "post-receive.cmd"
Run Code Online (Sandbox Code Playgroud)