Saving below to a shell script file and execute it under the git local repositories with multiple remote counterpart:
#!/bin/bash
set -e -x
mapfile -t remote_url < <(git remote)
for i in "${remote_url[@]}"; do
git push $i master
done
Known limitations:
uploading to multiple remote repositories
原文:https://www.cnblogs.com/zhaofeng-shu33/p/12115869.html