How do I push to the current git branch on remote, and have changes reflected immediately?

后端 未结 2 932
时光说笑
时光说笑 2021-01-19 04:44

I\'ve got a 2 web servers, one testing and one live. Both have their codebases managed with git.

I develop on the testing server, then push the changes from a master

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-19 05:26

    mipadi is right that you really need to have a bare repo to pull from on your production server. If you're not comfortable with a post-commit hook (lots of people aren't). You can create a cron job on that server that runs git pull origin master every half hour or so.

提交回复
热议问题