$ git push -u origin masterTo https://bitbucket.org/t3chlady/bigcommerceapi.git! [rejected] master -> master (non-fast-forward)error: failed to push some refs to 'https://t3chlady@bitbucket.org/t3chlady/bigcommerceapi.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.
I've tried several times to resolve this problem but I dont know what is causing it.
The only file in the bitbucket repository is the Read.me (which does not exist locally)
Not sure how to resolve the two repositories.
You need to pull first the branch from the repository. If there will be no conflicts, then your local code will be merged with the remote code. After it you can push your version to the remote destination.
Thank you for your reply.
I tried the following:
git pull --all
Fetching origin
There is no tracking information for the current branch
Please specify which branch you want to merge with
Since I have only the master branch in both locations I am not sure how to structure the command
I executed this command:
git branch --set-upstream-to=origin/master master
Then
git pull
and got this error:
fatal: refusing to merge unrelated histories
I am not sure what happened in your local git. But you can always clone repostitory to a new folder and then update required files from the current local folder.
Hello Alexey,
You always seem to provide simple and straightforward answers but I am new to bitbucket and git in general. I don't know how to clone the repository. Do I copy the files myself to a new space? Does the clone command do that? Can I use the respositories in bitbucket? Do I have to create another new one. I apologize but I'm not sure where to start. Thanks for your help.
Jean
You do not have to create a new repository. You should.
1. Create a new folder on your local computer
2. clone your repository into the new folder with the git clone command
3. Move changed files from the previous folder to the new folder.
4. execute git add *
5. execute git commit -m "changes"
6. execute git push origin <your current branch in the local filesystem>
It looks like you're new here. Sign in or register to get started.