Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 923
C graphics Avatar asked Oct 06 '14 05:10

C graphics


1 Answers

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
    
like image 100
VonC Avatar answered Oct 21 '22 01:10

VonC