There are cases where we might have one local git repository that we want to connect to multiple remote repositories. For instance, I might have a remote repository on Google Cloud Source Repositories and one on Github. If I want to update both with a single push (to keep them in sync), I can do the following.
I probably want [remote_name]
in the above command to be origin
, but possibly there are cases where it can be something else.
Then I can push with the usual
And if I ever need to delete one of the remotes, I can do the following: