Created
September 22, 2011 16:59
-
-
Save georgebashi/1235341 to your computer and use it in GitHub Desktop.
handy script for working with multiple repos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cmd="$1" | |
if [ $# -gt 1 ]; then | |
shift 1 | |
files=$@ | |
else | |
files=`find . -depth 1 -type d -not -name '.*' | cut -c 3-` | |
fi | |
for worktree in $files; do | |
echo "Updating $worktree..." | |
(cd $worktree && git $cmd) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment