sometimes I have some problems when I try to push my code to github. Let me explain the scenario:
I work with only master branch (because my product is at early stages and there is no need for creating a feature branch for now). My remote repository is at github and I am the only person that I am working on the project, so there is no parallel modifications of master branch.
Then I write some code, and after all tests of what I am coding are green, I commit to my local repository and to github using egit. No problem all changes are pushed to github, but sometimes, don't know exactly why because I "theory" (or at least for me is what it seems) egit (in fact git) does not allow me to push the changes claiming that master:master [rejected] error. In push to window I put as source ref and dest ref the [master] branch and I add "all branches spec". Of course in this cases I have to pull from remote and merge code and then recommit again. I understand the theory of why this happens current branch is behind remote branch, but why this happens if I am the only who are modifying the code in a linear way?
It works in most cases but why sometimes this error happens? I could understand if we were a team of developers pushing to same github account, but this is not the case.