IDEA fails to submit code with Git: Push rejected /Push to origin/master was rejected

Error prompt
insert image description here
solution
1. In the project root folder, right-click Git Bash Here
2. Enter the following command - you will need to enter the hosting service account password in the middle

git pull origin master --allow-unrelated-histories   
git push -u origin master -f

insert image description here

Guess you like

Origin blog.csdn.net/dontYouWorry/article/details/129159889