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?
Asked
Active
Viewed 4,642 times
2 Answers
34
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

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
2Works like charm! @C graphics, this should be marked as anwser! – Hiren Desai Feb 01 '17 at 11:19
2
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.
-
1
-
that is correct! ii had all my info into git and created a bit account, just because i can hAve the code in private, without having to pay a fee. – Cohen Jul 26 '17 at 19:43