Hi Francisco,
You can use a modified forking workflow to accomplish this but it won't be automatically synced without a more customized solution. Below is an example of how to sync them manually.
This Stack Overflow question has a good diagram and explanation: https://stackoverflow.com/a/9257901
You can have 1 repository on your local machine and set it up to have multiple remotes. What you would want to do is something like this:
# cd into the folder on your machine
# maybe the origin is set to Github, pull the latest changes
git pull origin master
# set Bitbucket as another remote named 'bitbucket'
git remote add bitbucket git@bitbucket.org:username/repo-name.git
# push the repo to the new remote 'bitbucket'
git push bitbucket master
# now the Bitbucket repo is up-to-date
Now, anytime you make changes and push to Github (origin), you can push to the other remote (bitbucket) to keep them in sync. Again, a more advanced solution would be to use Webhooks to sync them automatically.
Thanks, this helped my a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.