Created
February 11, 2012 15:29
-
-
Save aolshevskiy/1800846 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
set -e | |
git pull origin master | |
BRANCHES="" | |
for branch in $(git branch -r); do | |
if git log ${branch}^..${branch} | grep "$1" > /dev/null ; then | |
branch=$(echo $branch | sed s/.*\\///) | |
BRANCHES="$BRANCHES $branch" | |
fi | |
done | |
for branch in $BRANCHES; do | |
git checkout $branch | |
git merge master | |
git push origin $branch | |
git checkout master | |
git branch -d $branch | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment