I have a branch that was created from develop
(created from Atlassian Stash) that has a handful of commits. When I try and push my commits I get an error about updates being rejected because a pushed branch tip is behind its remote counterpart. Based on my understanding, this means that someone else committed, so I should pull the changes. However, there is nothing to pull. Funny thing is looking at Atlassian Stash I'm able to see that my push has in fact gone through.
$ git push
To REPO_URL
! [rejected] develop -> develop (non-fast-forward)
! [rejected] feature/135-add-button-to-ticket-indicating -> feature/ 135-add-button-to-ticket-indicating (non-fast-forward)
error: failed to push some refs to 'REPO_URL'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I'm not sure what it is I'm doing wrong, but I would love to know why this particular issue rears its ugly head every few days. In the past I have I have simply forced the push, but that doesn't help me understand why the issue is happening in the first place.
How can I diagnose why this issue is happening?