Converting Bitbucket to Github

I've previously worked with git and github on the command line. I downloaded sourcetree and played around with bitbucket just to see which is the best option. I seem to have accidentally moved Bitbucket to the command line. Since now when I do git init and try to push, nothing happens on github. Then I tried deleting all access keys from my mac and tried reinstalling github using ssh keys, but that doesn't seem to work. when i did a git pull - i got the following terminal line How to remove bitbucket and get back to work in github on my command line?

+3


source to share


1 answer


On GitHub, you will find your repository url on the right side

github

Copy this URL as needed. Now fire up a terminal and change to the directory where your git repository is located. Execute the following and you will see your bitbucket is set as source,

git remote -v

      



we need to remove it and replace it with your github. We can do it like this:

git remote remove origin
git remote add origin git@github.com:ollieatkinson/OKAMutableDirectedGraph.git

      

You should now be able to push / pull as usual. Remember to replace the remote URL with your own.

+2


source







All Articles