Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

git push not working

komal.gupta July 11, 2019

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.

2 answers

0 votes
Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 11, 2019

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.

0 votes
Jimmy Seddon
Community Champion
July 11, 2019

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

komal.gupta July 11, 2019

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events