I\'m working on a team with a few developers using git on BitBucket. We are all working on a dev branch, not pushing to master until a release.
dev
master
This is how I solved this issue:
git pull origin master
git push origin master
This usually happens when your remote branch is not updated. And after this if you get an error like "Please enter a commit message" Refer to this ( For me xiaohu Wang answer worked :) )