Skip to content

Instantly share code, notes, and snippets.

@TommyZG
Last active October 30, 2022 17:19
Show Gist options
  • Save TommyZG/0bfd0fdeca80123f0df26ed86dc4b6fe to your computer and use it in GitHub Desktop.
Save TommyZG/0bfd0fdeca80123f0df26ed86dc4b6fe to your computer and use it in GitHub Desktop.
Push existing project to Bitbucket
# Create repo @BitBucket
# cd /path/to/local/folder
git init
git add .
git remote add origin https://username@bitbucket.org/username/repo.git
git commit -m "Initial"
git push -u origin master
@ibadeeCodes
Copy link

ibadeeCodes commented Sep 11, 2021

! [rejected] main -> main (non-fast-forward)
error: failed to push some refs to 'https://bitbucket.org/username/web-app.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment