Skip to content

Instantly share code, notes, and snippets.

@i-e-b
Created March 9, 2012 13:41
Show Gist options
  • Save i-e-b/2006538 to your computer and use it in GitHub Desktop.
Save i-e-b/2006538 to your computer and use it in GitHub Desktop.
Perform a git pull on all subdirectories of a given folder
#!/bin/bash
pushd ~/.gvfs/work\ on\ iain-2003svrvm
folders=( */ )
for location in "${folders[@]%*/}"; do
pushd $location
git pull origin master
popd
done
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment