1. Use the forced push method, which will cause the remote modification to be lost, which is generally not advisable, especially when multi-person collaborative development.
git push -u origin master -f
2. Before pushing, modify the remote repository and pull it down
git pull origin master
git push -u origin master
3. If you do not want to merge remote and local modifications, you can create a new branch first:
git branch [name]
then push
git push -u origin [name]