#til you can push to multiple remotes at once with #git.

I created a remote alias called all:

git remote add all git@github.com:my/main-repo.git
git remote set-url --add --push all git@github.com:my/deploy-repo.git

Now when I run:

git push all trunk

…it pushes trunk both to the main repo and to the deploy repo in one shot.

A couple of notes:

  • The extra URL is for pushing only (not fetching), which makes sense.
  • If one push fails, the other may still succeed, so you can end up in a split state.
  • Both targets get the same refs — you can’t map branches differently per remote this way.
  • After pushing, git status may still show “ahead” until you fetch (pushing doesn’t refresh remote-tracking refs).

Still, for simple workflows, it’s a neat shortcut, for quickly keeping a couple of remotes up to date.


That keeps the “this was fun” vibe, but also signals to readers that you’re aware of the limits.

Want me to draft you two variations — one more “micro-post” style (tweet/toot length), and one more “blog-snippet” style?