解決:idea項目git提交時報錯Push rejected


今天用git提交項目的時候,死活提交不上,報錯push rejected,查了很多資料,在這里記錄一下

解決方案一:

在terminl窗口輸入命令:(親測)

git pull 

git pull origin master

git pull origin master --allow -unrelated -histories

解決方案二:

打開到git項目文件夾位置,鼠標右鍵git Bash Here,輸入如下兩行命令

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM