uploading to multiple remote repositories

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

猜你喜欢

转载自www.cnblogs.com/zhaofeng-shu33/p/12115869.html