I have a remote git repository and a local one that i work with. Whenever i do any changes locally, i push them to the remote. Then i sometime do a \"git commit\" on the rem
I have also faced same error and wasted lots of time, Here is final solution.
when use git push origin master then we get error so solution is to force push. so use second option. it worked for me.
git push origin master --force