目录
搭建GitServer
/  

搭建GitServer

参考文章:

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


标题:搭建GitServer
作者:gitsilence
地址:https://blog.lacknb.cn/articles/2020/06/18/1592441399713.html