参考https://devmarketer.io/learn/deploy-laravel-5-app-lemp-stack-ubuntu-nginx/
参考
参考
Setting Up Your Remote Server
cd /var
mkdir repo && cd repo
mkdir site.git && cd site.git
git init --bare
cd hooks
sudo nano post-receive
!/bin/sh
git --work-tree=/var/www/laravel --git-dir=/var/repo/site.git checkout -f
下面是实测成功,包括windows和linux
!/bin/sh
GIT_WORK_TREE=/var/www/project_name git checkout -f
sudo chmod +x post-receive
Set up our Local Computer to Push to Production
cd ~/proj
git remote add production ssh://root@example.com/var/repo/site.git
windows平台下如果没有ssh服务,只能在服务器上另创建一个仓库,添加至生产仓库
git remote add production /c/var/repo/site.git
git push production master