https://blog.csdn.net/sinat_34349564/article/details/52487860
https://blog.csdn.net/sinat_34349564/article/details/52442526
https://www.liaoxuefeng.com/wiki/896043488029600/899998870925664
创建目录/root/dist
cd /root/dist
初始化仓库
git init --bare
进入hook目录
cd hook
创建文件 /root/nginx/html为项目文件的地址,/root/dist为git仓库地址
#!/bin/sh
git --work-tree=/root/nginx/html --git-dir=/root/dist checkout -f
添加远程仓库
git remote add origin root@xxx:/root/dist
然后就是 add commit push