Skip to content

Instantly share code, notes, and snippets.

@was0107
Created December 28, 2016 06:27
Show Gist options
  • Save was0107/1d87012db3873310053d66519efd41b5 to your computer and use it in GitHub Desktop.
Save was0107/1d87012db3873310053d66519efd41b5 to your computer and use it in GitHub Desktop.
pull当前目录下的所有GIT项目
#!bin/bash
WORK_PATH="$PWD"
function list() {
SAVEIFS=$IFS
IFS=$'\n'
for file in $1/*
do
echo $file
if [[ -d "$file" ]] ; then
cd $file
git pull origin master
fi
done
IFS=$SAVEIFS
}
list "$WORK_PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment