批量拉取git仓库的shell脚本

#!/bin/bash

# 定义要克隆的仓库列表
REPO_LIST=(
  "test1-rep"
  "test2-rep"
)

# 遍历仓库列表,并克隆到当前目录
for repo in "${REPO_LIST[@]}"; do
  git clone git@gitee.com:username/$repo.git
done

# 显示克隆成功的提示
echo "克隆成功!"

执行前需要给执行权限

chmod +x clonerep.sh