Skip to content

Instantly share code, notes, and snippets.

@atkit
Created September 17, 2018 08:32
Show Gist options
  • Save atkit/5f0fdd45a02c65dbbf5c7c2cfc8a694d to your computer and use it in GitHub Desktop.
Save atkit/5f0fdd45a02c65dbbf5c7c2cfc8a694d to your computer and use it in GitHub Desktop.
Bash Script - Git Pull All Folders in the current folder
#!/bin/bash
for file in */ ; do
if [[ -d "$file" && ! -L "$file" ]]; then
echo "----------------------------------------------------------------------------------------"
echo "🍄 Pulling $file"
cd $file
git pull --verbose
cd ..
echo "----------------------------------------------------------------------------------------"
echo
echo
echo
fi;
done
echo "✅ Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment