在Windows post-receive hook上创建捆绑包 [英] Git on Windows post-receive hook to create bundle
问题描述
我在apache 2.2服务器上托管一个git仓库,作为Windows 2003服务器上的本地服务运行。我想添加一个git post-receive钩子来更新dropbox sync目录中的一个包。客户端拉和推工作,我能够在Windows命令行生成的捆绑,我蹒跚如何编写和调试钩子的shell脚本。
第一个刺我在下面的内容的hooks目录下创建了一个post-receive文件,但是当我将更改推送到服务器时,似乎没有发生任何事情
!/ bin / sh
当一个钩子失败时,是否有任何生成的日志可以用于调试?
据我所知,没有生成日志文件。您可以修改您的脚本以记录您想要的内容。
另外,请确保您的脚本是可执行的。
I have a git repo hosted on an apache 2.2 server running as a local service on a windows 2003 server. I'd like to add a git post-receive hook to have a bundle in the dropbox sync directory updated. The client pull and push work and I am able to generated the bundle at the windows command line, I am stumbling over how to write and debug the hook's shell script.
As a first stab I created a post-receive file under hooks directory with the contents below, but nothing seems to happen when I push changes to the server
!/bin/sh
git bundle create "C:\Documents and Settings\fkhan\My Documents\Dropbox\git_bundles\cs701.bundle" master --all
When a hook fails are there any logs generated that can be used for debugging?
As far as I know, no log file is generated. You can modify your script to log what you want though.
Also, make sure your script is executable.
这篇关于在Windows post-receive hook上创建捆绑包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!