#!/usr/bin/env bash dir=$(pwd) ls | while read -r line; do fileDir=${dir}/$line if [ -d "$fileDir""/.git" ]; then echo "pull start ================$line=====================" cd "$fileDir" && git pull echo "pull end ==================$line=====================" echo -e "\n" fi done
用shell脚本从git上拉取,项目目录下所有各个子项目代码
原文:https://www.cnblogs.com/yszr/p/14270914.html