C graphics
C graphics

Reputation: 7458

How pull changes from github to bitbucket after initial import?

When I first created my new repository at bitbucket I used the option of importing source from github (Import existing code). However that git repo has now updated and I would like to pull those changes and update my repo at bitbucket too. How can I do that?

Upvotes: 12

Views: 5353

Answers (2)

Cohen
Cohen

Reputation: 984

I had the same issue. I have deleted the old repository from bitbucket and than i could reclone it/import it from github to bitbucket.

Simple like that.

Upvotes: 2

VonC
VonC

Reputation: 1329562

You need to:

  • clone your BitBucket repo locally
  • add a remote referencing your GitHub repo

    git remote add github /url/of/github/repo
    
  • pull from that github repo

    git pull github master
    
  • push back to bitbucket

    git push -u origin master
    

Upvotes: 35

Related Questions