Last Updated: February 25, 2016
· freiden

Manage multiple Git repositories for a project

Originally from

1.Rename default remote 'origin'

git remote rename origin <old_origin>

2.Create the new repository for the project if not already done

3.Add the new repo to the project:

git remote add <new_repo> git@<platform_git>/username/somerepo.git
git push -u <platform_git> --all

4.Add a new remote named 'origin' to allow you to push to the two previous remote at the same time:

git remote add origin ''

5.Update your project .git/config remote origin part to this:

[remote "origin"]
  url = git@<old_repo>:username/somerepo.git
  url = git@<new_repo>/username/somerepo.git

6.Then set your project new upstream for your current branch:

git push -u origin <project_branch>


git push -u origin --all

Et voila !!