Reputation: 824
I have a post-receive hook to deploy my app in webroot when I push on master branch. This is my script:
#!/bin/bash
while read oldrev newrev ref
do
if [[ $ref =~ .*/master$ ]];
then
echo "Master ref received. Deploying master branch..."
git --work-tree=/var/www/mywebroot --git-dir=/home/myuser/myrepo checkout -f master
else
echo "Ref $ref successfully received. Doing nothing."
fi
done
The problem is that when I push any commit that deletes any file, the files were removed are not removed in webroot.
Upvotes: 2
Views: 222