1.报错信息:

IDEA push 文件报错:Push rejected: Push to test/master was rejected

2.报错原因:项目之中存在与历史不符的东西,导致push被拒绝

3.解决办法:在需要上传文件的位置鼠标右键git Bash Here打开命令行输入命令

IDEA push 文件报错:Push rejected: Push to test/master was rejected

命令行输入:
git pull origin master -- allow-unrelated-histories
git push -U origin master -f

IDEA push 文件报错:Push rejected: Push to test/master was rejected

4.进入IDEA重新push,发现问题解决了,可以往gitee上传代码了

相关文章:

  • 2021-07-01
  • 2021-07-21
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
猜你喜欢
  • 2021-04-12
  • 2021-11-16
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案