1、同步多个项目文件夹
#!/bin/bash
curPath=$(cd "$(dirname "$0")"; pwd)
for i in {test,test_ios,test_android}
do
cd ${curPath}/$i
echo ""
echo -e "\e[1;31mgit pull $(cd "$(dirname "$0")"; pwd). \e[0m"
git pull origin master
done
echo ""
echo -e "\e[1;31mgit pull complete. \e[0m"
read -p "Press any key to continue." var

本文介绍了一个使用bash编写的简单脚本,该脚本能够批量执行git pull操作,适用于需要同步更新多个项目的场景。
123

被折叠的 条评论
为什么被折叠?



