Reputation: 16053
I've imported a repo from GitHub to Bitbucket using bitbucket's import repository option. It has imported all the branches, tags, commits etc.
Now, the original repo has changed and new branches/tags/commits have been created in the original repo. How do I update my bitbucket's repo at par with the Github's repo?
PS: I can delete the bitbucket repo & re-mirror the Github's repo. But, I'd like to know an alternate way to update the bitbucket repo with the diff.
PPS: I can pull the latest master to my local & then push it to the butbucket's master but I want to push all the new branches/tags also.
Upvotes: 4
Views: 1917
Reputation: 1329522
The easiest way, if you don't have made and push new commits on your own is to:
add the bitbucket one as a remote
git remote add bb /url/to/bitbucket/repo
push to it with the --mirror
option:
git push --mirror bb
That will push everything (branches and tags)
In that case, it will help if your work on BitBucket is done in a dedicated branch instead of a branch common between the BitBucket et the GitHub repo.
Upvotes: 6