git 自动拉取脚本
程序员文章站
2022-05-06 19:09:28
...
windows bat
@echo off
setlocal enabledelayedexpansion
cd C:\GitlabSource\test02
for /f %%i in ('git branch -r ^| find /V /I "->"') do (
set "var1=%%i"
set "var1=!var1:/= !"
echo !var1!
set "var2=!var1:origin= !"
echo !var2!
git checkout !var2!
git pull !var1!
)
pause
linux
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
上一篇: ubuntu安装英伟达显卡驱动
下一篇: 备份——windows上软件配置