Skip to content

Instantly share code, notes, and snippets.

@zhugexiaobo
Created August 29, 2013 10:30
Show Gist options
  • Save zhugexiaobo/6376519 to your computer and use it in GitHub Desktop.
Save zhugexiaobo/6376519 to your computer and use it in GitHub Desktop.
批量 git pull 仓库最新代码
#!/bin/sh
for dir in $(ls -d */)
do
if [ -d "$dir"/.git ]; then
echo "$dir" && cd "$dir" && git pull && cd ..
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment