$ git push -u origin master
To 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 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.
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.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexey,
I followed your instructions and on step 6, I got this error:
fatal 'c:VS2017ProjectsBigCommerceAPI doesnot appear to be a git repository
Fatal: could not read from remote repository.
When I used the clone command I put in a full path to the old folder. Perhaps that is what the error is all about.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to clone in a new repository. And then copy changed files from the old repository to the new one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.