Git hook post-receive does not checkout on WIndows

0

I'm using git to do an automatic deploy .

There are two computers with windows 7 on a local network. One would be a server and the other would be my development environment.

I have created a BARE repository on my server and another repository on the server that will contain the php files that will be accessed by the user

I can push my development machine to BARE repository on the server.

On the server I checked that the BARE repository is being updated because I have cloned it to another folder on the server and it is normal and updated

However after doing this same push the following error

Counting objects: 3, done.
Writing objects: 100% (3/3), 281 bytes | 281.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: fatal: Invalid path 'C:/xampp': No such file or directory
To //nrspdt214406/var/repo/planejamento.tecnico.git
   dd1adcf..ea5b4c8  master -> master

And with that the files that are in BARE do not go to my repository that will be public access.

If I run the -f checkout through git bash in the BARE repository the public repository is updated.

The post-receive is as follows:

#!/bin/sh
GIT_WORK_TREE='c:/xampp/htdocs/planejamento.tecnico' git checkout -f
    
asked by anonymous 10.10.2017 / 22:35

0 answers