NOTICE: This is never a recommended use of git. This will overwrite changes on the remote. Only do this if you know 100% that your local changes should be pushed to the remote master.
⚠️ Try this: git push -f origin master
git push -f origin master
As the error message says: git pull before you try to git push. Apparently your local branch is out of sync with your tracking branch.
git pull
git push
Depending on project rules and your workflow you might also want to use git pull --rebase.
git pull --rebase
this command worked well for me