Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (19.4k 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 (27.5k 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!

28.4k questions

29.7k answers

500 comments

94k users

Browse Categories

...