I have one repository which I want to push into Bitbucket and GitHub.
It is vital for my repository to be hosted by both.
Is there a way to do this in Git?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use multiple remote repositories with git. But you’ll have to push separately into 2 of your remotes I believe.
For example, if your project currently points to github, you can rename your current remote repository to
github:You can then add another remote repository, say
bitbucket:Now in order to push changes to corresponding branch on github or bitbucket you can do this:
Same rule applies to pulling: you need to specify which remote you want to pull from: