[英]How to write Git Server Hooks on Windows platform?
我找不到任何關於Windows的Git鈎子的明確例子。 我在Windows Server上使用Bonobo Git Server。 我需要預先提交和后提交掛鈎作為cmd或bat。 預提交應檢查空注釋,提交后應發送有關提交的電子郵件通知。 可能有人有類似的鈎子並准備分享?
經過一些實驗,我發現了這一點
#!/Git/sh
echo This is the receive-hook >> result.txt
在
C:\inetput\wwwroot\Bonobo.Git.Server\App_Data\Repository\<your repository>\hooks\receive-hook
是在遙控器上執行的
git push
然后你就可以調用批次了
#!/Git/sh
cmd //C "post-receive.cmd"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.