Skip to content

Instantly share code, notes, and snippets.

@zjhiphop

zjhiphop/git-bundle

Forked from garryyao/git-bundle
Last active Dec 25, 2015
Embed
What would you like to do?
#!/bin/bash
# Issue arbitary git command for each of the sub modules.
# E.g. git-bundle checkout feature/docs
# Check out the feature/docs branch for each of the sub module.
function print_header
{
printf '%.0s-' {1..30} && echo
echo $1
printf '%.0s-' {1..30} && echo
}
# Blobing pattern for directories, replace with whatever u like.
PATTERN="**/troopjs-*"
# Pass all params to git command.
COMMAND=$@
for i in $PATTERN
do
print_header $i && cd $PWD/$i && git $COMMAND && printf '\n\n\n'
done
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.