Michael James Kali Galarnykon Stack Overflow • Recommends
On “Getting an error pushing to github - Updates were rejected because a pushed branch tip is behind its remote”
I am always a big fan of using git pull --rebase and then git push origin master . A couple of the places I have worked since a lot of places do not allow a push -f (especially places that use bitbucket).
git pull --rebase
git push origin master
The rebase will apply your changes after those already to the remote (online website). This video literally goes over your exact issue and solves it using git pull --rebase link to this video