透过 Git 在 Server 更新代码

linux 安装Git

sudo sed -i '/^failovermethod=/d' /etc/yum.repos.d/*.repoyum install git --disableexcludes=main --skip-broken

shell script

#!/usr/bin/env bashcd /need update folder pathgit fetch maingit checkout -b maingit pull -f origin main

对需要更新的资料夹 做初始化
nlstudio:PASSWORD ( 帐号密码)

git initgit remote add origin https://nlstudio:PASSWORD@gitlab.sample.com/ithelp/testgit.git

关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章