Git: Dealing with Multiple Remote URLs

Adding multiple remote URLs to your codebase:

Here is the step-by-step guide, very well written!

Pull and push from multiple remote URLs:

  • To pull all branches from multiple remotes: git pull --all
  • To pull specific branch from multiple remotes: git pull --all <branch>
  • To push all branches to multiple remotes: git remote | xargs -L1 git push --all
  • To push specific branch to multiple remotes: git remote | xargs -L1 -I R git push R <branch>

For more info on git push commands, checkout the answer at the stack overflow.

Delete URL

git remote remove <url_name>

Rename URL

git remote rename <url_oldname> <url_newname>

--

--

--

Data Scientist | Machine Learning Specialist | AI Enthusiast | Innovative & Smart Homes | Computational Sustainability

Love podcasts or audiobooks? Learn on the go with our new app.

Tips to take AWS Architect- Associate Certification

Sam’s List | DC Design and Tech Meetups: Dec. 9–14th, 2019

Secrets and Credentials are much easier to Steal in the Cloud — What to do about it?

Too many SaaS products image

#11 Using image data, predict the gender and age range of an individual in Python

The 5 worst mistakes in choosing a software company — and how to avoid them

What is Entities in Entity Framework?.

The Right choice of Tech Stack for Your Project: Basic Principles

AWS VPC NAT Gateway

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Milan Jain

Milan Jain

Data Scientist | Machine Learning Specialist | AI Enthusiast | Innovative & Smart Homes | Computational Sustainability

More from Medium

Setting Up Multiple Git Profiles for Fun, Work, and Profit

30 useful git commands every developer should know

Is it necessary to have an internet connection to use Git locally?

Git Configuration