在Windows post-receive hook上创建捆绑包 [英] Git on Windows post-receive hook to create bundle

查看:166
本文介绍了在Windows post-receive hook上创建捆绑包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在apache 2.2服务器上托管一个git仓库,作为Windows 2003服务器上的本地服务运行。我想添加一个git post-receive钩子来更新dropbox sync目录中的一个包。客户端拉和推工作,我能够在Windows命令行生成的捆绑,我蹒跚如何编写和调试钩子的shell脚本。



第一个刺我在下面的内容的hooks目录下创建了一个post-receive文件,但是当我将更改推送到服务器时,似乎没有发生任何事情



!/ bin / sh



git bundle createC:\ Documents and Settings \fkhan\My Documents\Dropbox\git_bundles\cs701.bundlemaster --all



当一个钩子失败时,是否有任何生成的日志可以用于调试?

解决方案 div>

据我所知,没有生成日志文件。您可以修改您的脚本以记录您想要的内容。



另外,请确保您的脚本是可执行的。


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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆