Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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>

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...