git push new repo to bitbucket code example

Example 1: how to push code to bitbucket

git remote add origin <the URL for your Bitbucket repository> 
git push -u origin master

Example 2: how to push code to bitbucket

git init
git add --all
git commit -m "Initial Commit"

Example 3: repo from bitbucket to github

cd $HOME/Code/repo-directory
# Rename Origin to bitbucket
git remote rename origin bitbucket
# Add the origin of your new github repository
git remote add origin https://github.com/<username>/<repo-name>.git
# Push ypur branch master to your github repo
git push origin master
# Remove the old origin
git remote rm bitbucket