I have a private git repository on my PC and want to import this repo into bitbucket. Is there an easy way to do this?
Hi @ekennedy80,
Welcome to Atlassian Community!
To import a local repository this is what you need to do:
git remote add origin <repository URL>
git push -u origin master
When I try to push I get the following - I assume its because the bitbucket repo is not as empty as we'd like? - it has a README.md and .gitignore which I dont want/need? how do I force the push to overwrite the nearly empty bitbucket?
! [rejected] master -> master (non-fast-forward)error: failed to push some refs to 'https://bitbucket.org/advenergy/im_dc_lit_g703_103_gnd_fw.git'hint: Updates were rejected because the tip of your current branch is behindhint: 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.
It looks like you're new here. Sign in or register to get started.