This is how to add a git project which you have created locally to Bitbucket.

curl -k -X POST --user my_username "https://api.bitbucket.org/1.0/repositories" -d "name=project_name" -d is_private='true'
git remote add origin [email protected]:my_username/project_name.git
git push -u origin --all
git push -u origin --tags

(source)