Multiple Git remotes repositories
Posted: February 14, 2016 Filed under: Trick | Tags: git, Tutorial Comments Off on Multiple Git remotes repositoriesLet say, you would like to make back up code to multiple repositories. For the example; one is Github and another is self hosted Gitlab.
git remote set-url --add --push origin [email protected]:rained23/yosh.git
git remote set-url --add --push origin [email protected]:invoture/yosh.git
So when you push to origin, it will push to both repositories.
A git remote -v should reveal the actual URLs for all remotes.
git remote set-url --add --push all git://another/repo.git