git push to all / multiple origins

Just a fancy alias

pushall = "!f(){ b=${1:-$(git rev-parse --abbrev-ref HEAD)}; for r in $(git remote); do echo \">>> pushing $b to $r\"; git push \"$r\" \"$b\"; done; }; f"

Leave a Reply

Your email address will not be published. Required fields are marked *