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 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.