简体   繁体   中英

Merge staging repository bare repository after push via hooks (GIT, Windows, GitStack)

I have installed GitStack on Windows Server 2008, and for a given project created a bare repository to which I push from my local development environment. I'd like to set up a hook that causes my staging environment to merge the pushed changes automatically on every push.

I'd posted a previous bash script but have now updated this to the below:

#!/bin/sh
export GIT_WORK_TREE=F:\\inetpub\\project_name\\staging\\
export GIT_DIR=F:\\inetpub\\project_name\\staging\\.git
git pull origin master

And get the following error message:

remote: bash.exe: warning: could not find /tmp, please create!
remote: From F:/GitStack/repositories/project_name
remote: * branch master -> FETCH_HEAD
remote: error: unable to create directory for f:/inetpub/project_name/staging/.git/refs/remotes/origin/master
remote: ! c8f4278..80cbe73 master -> origin/master (unable to update local ref)
To http://me@mydomain.com:9999/project_name.git c8f4278..80cbe73 master -> master updating local tracking ref 'refs/remotes/origin/master'

I'm not sure where to go from here - any tips?

尝试以管理员身份运行GitStack服务。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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