チェックアウトしてあるすべてのブランチをプル

# チェックアウトしてあるすべてのブランチをプル
function gp() {
    current=$(git rev-parse --abbrev-ref HEAD)
    for b in $(git for-each-ref refs/heads --format='%(refname:short)')
    do
        git branch -vv | grep "${b}.*behind" > /dev/null
        if [ "$?" -eq 0 ]
        then
            git checkout $b&&git pull
        fi
    done
    git checkout -q $current
}