IDEA用Git提交代码失败:Push rejected /Push to origin/master was rejected

报错提示
IDEA用Git提交代码失败:Push rejected /Push to origin/master was rejected_第1张图片
解决办法
1.在项目根文件夹,右击Git Bash Here
2.输入以下指令即可-中间会要输入托管服务账号密码

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

IDEA用Git提交代码失败:Push rejected /Push to origin/master was rejected_第2张图片

你可能感兴趣的:(常见问题处理记录,git,github)