在Windows上设置git repo post-receive

时间:2012-07-30 12:16:47

标签: windows git git-post-receive

我想在我的Windows服务器上设置git部署,但是我在使用git post-receive事件更改导向时遇到了一些麻烦。我收到“没有这样的文件或目录”错误。

我有以下设置:

  1. Windows共享上的git存储库// share / git / repo /
  2. 后接收配置如下:

    #!/ bin / sh的

    回应“构建Arla解决方案”

    cd / c / Builds

    取消设置GIT_DIR

    git pull origin master

    回复“做一些构建后的动作......”

  3. 当我执行提交/推送到存储库时,如果在行上失败:cd C:/Builds

    我在Linux服务器(VPS)上设置了类似的东西,没有任何问题。我认为问题是我如何格式化更改目录。

    有什么建议吗?

1 个答案:

答案 0 :(得分:0)

git的bash(AFAIK)不熟悉C:
尝试将相关行替换为/c/Builds
请注意,与bash

不同,Windows区分大小写
相关问题