i am trying to push my changes on server but its throw error below:
error: failed to push some refs to 'git@bitbucket.org:intimetec/cartos.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.
I already took pull, and its showing already up to date. but when i push my changes its throw error.
What is the output of?
git remote -v
If the remote 'origin' is setup correctly, you could try the following commands:
git checkout master
git pull
git checkout feature-branch
git merge master / <or> / git rebase master
git push -u origin feature-branch
If you do not care about rewriting history, you could force push to a feature branch but be very careful when doing this.
Hi @komal.gupta,
Welcome to the Community!
Are you using windows? and do you have Mac/Linux users as well? I'm only asking becuase the only time I have seen this type of thing happen is when the branch exists within BitBucket in both uppercase & lowercase. Linux & Mac will see this as two different branches, but Windows does not and can get confused.
Just something worth looking into.
I hope that helps!
-James
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi James,
yes, i am using Linux. i have created a branch using this command "git checkout -b branchname --track origin/develop" and not push it yet. so it does not exist on BitBucket. But still getting this error.
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.