script to synchronize two git repositories

this code will pull master from a repositories and push it to and other. it can be use to syncrhronize a repositories on github with one on gitlab

i use a cloning statement if the repositorie do not exist localy

set up

  • to use this script you need to change the urls of the two git repositories
  • make it executable chmod -x synchronize_two_git_repo.sh
  • execute the script ./synchronize_two_git_repo.sh