Given a bare repository, I can use git --work-tree=/path/to/folder --git-dir=/path/to/bare.git checkout -f in the post-receive hook to checkout the head to folder without having the .git folder inside. How can I do achieve this when the folder sits in on a remote machine?
I am aware of git clone --depth=1 but I cannot use this because the remote folder may already exist. rsync [--delete] is not an option neither because I want files that are local to each folder but not in the repo (e.g. all folders contain a different confi.local.ini).