existing code to bitbucket

Let’s assume you ‘ve got setup a small project locally and it’s time to add it to bitbucket.

All you need to know is: https://confluence.atlassian.com/bitbucketserver/importing-code-from-an-existing-project-776640909.html

There are a couple of details though that could make your life difficult if you don’t pay the proper attention:

  • Locally:
git init
git add --all
git commit -m "Initial Commit"
  • Bitbucket: create a repo (but pay attention!) without adding any READMEs. Repo must be empty, otherwise upload will fail! Now, use clone button top-right corner && copy URL.
  • Locally (once again):
git remote add origin {{copied_url}} 
git push -u origin master

Done!

Leave a Reply

Your email address will not be published. Required fields are marked *

3 + 1 =