Want to 'move' my repository from Raspberry Pi to Bitbucket

I have been playing around with git enough now and want to take the next step and make my project hosted remotely.  My current project is hosted locally on a Raspberry Pi at my desk.  I do back it up nearly every day if I've made changes.  I'm still green enough though to not have done github, bitbucket or whoever from the get-go, but now I want to expand a bit and even incorporate SourceTree and git-flow into how I work.  All of my development will be directed to a Raspberry Pi still.  So what do I need to do to move my code and my .git settings into Bitbucket?  If I look at the "Import existing code" form from Bitbucket it wants a URL, so I'm not sure how to do that.  Seems like I want to push all of my stuff to Bitbucket.

Something I just read says that git has no notion of a central repository, all repositories are the same or equal.

1 answer

1 accepted

It is theoretically true that Git has no notion of a central repository.  But it's often not true in practice.

First create an empty repo on Bitbucket.  Then you should be able to push your repo to Bitbucket like this

git remote add bitbucket <url>
git push --all bitbucket
git push --tags bitbucket

 

 

Thanks. I found that if you create a new repository on Bitbucket, it will give you instructions on how to push your code up to the new remote. I had to delete my current 'origin' (it was nonsensical anyway) and re-add my origin to be my new bit bucket repos.

Yes, that's better if your current 'origin' wasn't meaningful.

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

274 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot