0 votes
1 view
in Devops and Agile by (20k points)

I have two remote git repositories. origin and github

I push my branch devel to both repositories.

git push -u origin devel

git push -u github devel

But then, when I do. git push It would only get pushed to github.

Is there any way I can set up my two remotes so that I can push changes to both repositories with one command?

1 Answer

0 votes
by (28.4k points)

The following commands should do the magic:

$ git remote set-url origin --push --add <a remote>

$ git remote set-url origin --push --add <another remote>

Welcome to Intellipaat Community. Get your technical queries answered by top developers !