I have a bare git repo in an AWS EC2 instance. Each time it receives a push, a post-receive hook should copy the update to the web folder. This is the hook:
$ nano hooks/post-receive
#!/bin/sh
sudo git --work-tree=/www-folder --git-dir=/git-folder/repo.git checkout -f
$ chmod +x hooks/post-receive
This works when locally I am in the master branch. However, when I create a hotfix branch and push to the repository, the website does not update. Why? What should I do to have the remote website synchronized with my local branch?
Aucun commentaire:
Enregistrer un commentaire