I would basically find out what is on the server and pull out a whole branch from fresh ones.
This probably means a power push. Note that force clicks are generally unsafe and should be avoided when clicking on a shared source code repository such as GitHub. But in this situation, when you try to upgrade a PaaS server, this is probably good.
You can visually visualize your branches with gitk , git log --all --graph --decorate or some other tool before you press force to make sure everything looks as you expect.
To force push the local master branch to the remote master origin origin branch, run
git push --force-with-lease origin master:master
The argument --force-with-lease will force the push to succeed only if your local branch is updated relative to the one you are pushing to. (This prevents accidentally overwriting commits that you are not aware of.) I highly recommend using the with-lease option whenever possible, instead of the old --force argument, which is less secure.
Chris source share