VS git 出現錯誤: rejected Updates were rejected because the tip of your current branch is behind

Q1:發佈到遠程存儲庫時遇到錯誤: rejected Updates were rejected because the tip of your current branch is behind its remote counterpart. Integrate the remote changes before pushing again.

正在推送 master
Error: failed to push some refs to 'https://github.com/dogdng/xxxxxxxxx.git'
Error: hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

發佈到遠程存儲庫時遇到錯誤: rejected Updates were rejected because the tip of your current branch is behind its remote counterpart. Integrate the remote changes  before pushing again.

解決方法

同步選項下打開命令提示符
在這裏插入圖片描述
在命令行中輸入:

git pull origin master --allow-unrelated-histories
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章