1

I have a Git repository on GitHub that has already been established. Now, I want to mirror that same repository onto Google Code. Either that, or I want Google Code's Source tab to either disappear or point to GitHub. Since that doesn't seem possible, how do I sync the two repositories? All the other answers don't cover if the first Git repo is already established.

asked Apr 22, 2013 at 20:14
1
  • 1
    This seems like you're more concerned about the UI than actually storing the code in 2 places. Commented Apr 22, 2013 at 20:16

2 Answers 2

3

Assuming you already set up a remote for Github named origin (as you will if you followed Github's instructions), you can add a second URL to it for Google Code:

git remote set-url --add origin https://project.googlecode.com/git

Now you'll automatically push to both Github and Google Code at once when you git push to that remote. That's probably the easiest way to keep them synced.

answered Apr 22, 2013 at 20:29
Sign up to request clarification or add additional context in comments.

Do you have to do that for each "clone"?
this works, but how do you configure different credentials for each repo?
1

Simply clone the git repository from one location, Google code or github. Then add a remote to the other repo

git remote add google git://...google code clone url

then simply use git push google and git push origin

answered Apr 22, 2013 at 20:28

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.