简体   繁体   English

在Windows上设置git repo后接收

[英]Setup git repo post-receive on Windows

I would like to setup git deployment on my Windows server, but I'm having some trouble changing director from the git post-receive event. 我想在Windows服务器上设置git部署,但是从git post-receive事件更改Director时遇到了一些麻烦。 I get a "No such file or directory" error. 我收到“没有这样的文件或目录”错误。

I have the following setup: 我有以下设置:

  1. a git repository on a Windows share //share/git/repo/ Windows共享上的git存储库// share / git / repo /
  2. a post-receive configure as following: 接收后配置如下:

    #!/bin/sh #!/ bin / sh的

    echo "Building the Arla Solution" 回显“构建Arla解决方案”

    cd /c/Builds cd / c /构建

    unset GIT_DIR 未设置GIT_DIR

    git pull origin master git pull起源大师

    echo "Doing some post build actions..." echo“正在执行一些后期构建操作...”

When I do a commit/push to the repository if fails on the line: cd C:/Builds . 当我在行上执行commit / push到存储库时失败: cd C:/Builds

I've setup something similar on a Linux server (VPS) without any problems. 我已经在Linux服务器(VPS)上安装了类似的东西,没有任何问题。 I think the problem is how I've formatted the change directory. 我认为问题在于我如何格式化更改目录。

Any suggestions? 有什么建议么?

git 's bash (AFAIK) is unfamiliar with C: , git的bash(AFAIK)不熟悉C:
Try replacing the relevant line to /c/Builds 尝试将相关行替换为/c/Builds
Keep in mind bash is case sensitive unlike Windows 请记住, bashWindows不同,区分大小写

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM