Skip to content

Instantly share code, notes, and snippets.

@jbenner-radham
Created November 3, 2015 04:25
Show Gist options
  • Select an option

  • Save jbenner-radham/f66d7fe679dc396c551a to your computer and use it in GitHub Desktop.

Select an option

Save jbenner-radham/f66d7fe679dc396c551a to your computer and use it in GitHub Desktop.
Update all the Git repos inside your current working directory.
#!/usr/bin/env sh
for dir in $(ls); do
if [ -d "${dir}/.git" ]; then
echo "Updating \"${dir}\"..."
(cd "$dir" && git pull)
echo "\n"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment