Updating imported repo from github to bitbucket

I imported a repo from GitHub to Bitbucket using the Bitbucket import repository option. It imported all 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 the bitbucket repository to match the Github repository?

PS: I can delete the bitbucket repository and re-mirror the Github repository. But I would like to know an alternative way to update the bitbucket repository using diff.

PPS: I can push the latest master to my local and then push it to masterbushet, but I want to push all new branches / tags as well.

+3
git bitbucket github repository updates


source to share


1 answer


The easiest way, if you haven't made and are not forcing new commits, is:

  • clone github repo
  • add bitbucket as remote

    git remote add bb /url/to/bitbucket/repo
    
          

  • click on it with the option--mirror

    :

    git push --mirror bb
    
          



This will push everything (branches and tags)

In this case, it helps if your BitBucket work is done on a dedicated branch instead of a shared branch between BitBucket relay and GitHub.

+3


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics