Email or username:

Password:

Forgot your password?
Fabian οΏ½ πŸ³οΈβ€πŸŒˆ

#Git
Did you know that you can set 2 or more remotes with the same alias and so push to both (or more) of them at the same time when doing a git push?

That way you can push to gitlab, gitea and github in a single command

took me way, waaay to long to realize. :blobcatnotlikethis:

12 comments
Mina

@fabiscafe and then how do you pull from a specific remote?

mushroom πŸ„
@fabiscafe i usually add a β€œfork” remote when forking a project to contribute or work on
β€œorigin” remote is the upstream where I’m read-only and β€œfork” is… you get it

How do you push to all remotes at once?
Kaushal Modi :emacs:

@fabiscafe I simply set multiple "pushurl"s for a remote name. When I pull, it will pull stuff only from the "url".

Here's one of the search results, arbitrarily picked, from searching "multiple pushurl git": delenamalan.co.za/til/2020-09-

#git

Fabian οΏ½ πŸ³οΈβ€πŸŒˆ

@kaushalmodi that looks like kind of the same, just for push only? :blobcatthink: that might be the better solution for more cases. Thanks πŸ‘

Kaushal Modi :emacs:

@fabiscafe How would pulls from multiple remotes to the same remote alias work though?

My use case for multiple pushurl's is to maintain multiple backups of my repo.

eBourgess

@fabiscafe that's actually cool! thanks for sharing that

Go Up