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:

  • single branch support
  • single threaded
posted on 2019-12-29 18:33  赵丰数33  阅读(127)  评论(0编辑  收藏  举报