Skip to content

Instantly share code, notes, and snippets.

@cmmartin
Forked from oztune/pullall
Created March 13, 2014 21:41
Show Gist options
  • Save cmmartin/9537556 to your computer and use it in GitHub Desktop.
Save cmmartin/9537556 to your computer and use it in GitHub Desktop.
#!/bin/bash
for file in *
do
if [ -d $file ]
then
cd $file
echo Pulling `pwd` `git branch 2>/dev/null | grep -e '^*' | sed -E 's/^\* (.+)$/(\1) /'`
git pull
cd ../
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment