The short: is there a way to have a git repo push to and pull from a list of remote repos (rather than a single \"origin\")?
The long:
Adding the all
remote gets a bit tedious as you have to setup on each machine that you use.
Also, the bash
and git
aliases provided all assume that you have will push to all remotes.
(Ex: I have a fork of sshag
that I maintain on GitHub and GitLab. I have the upstream remote added, but I don't have permission to push to it.)
Here is a git
alias that only pushes to remotes with a push URL that includes @
.
psall = "!f() { \
for R in $(git remote -v | awk '/@.*push/ { print $1 }'); do \
git push $R $1; \
done \
}; f"