Last active
August 5, 2022 12:45
-
-
Save pixelbrackets/be1937fb6920478cbf6c02853106f110 to your computer and use it in GitHub Desktop.
Add a Git remote named »all« which groups all existing remotes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Source: https://akrabat.com/git-push-to-multiple-repositories/ | |
if [ "`git remote| grep all`" == "all" ] ; then | |
git remote remove all | |
fi | |
for r in `git remote` | |
do | |
git config --add remote.all.url `git config remote.$r.url` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation
Usage