Created
November 13, 2013 01:59
-
-
Save philpennock/7442294 to your computer and use it in GitHub Desktop.
git: Push a branch to a group of remotes
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 | |
groupname="${1:?Need a group to push to}" | |
branch="${2:-master}" | |
for r in $(git config "remotes.${groupname}"); do | |
echo >&2 "Pushing '${branch}' to '${r}'" | |
git push "$r" "$branch" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment