GitHub for Windows提交失敗“failed to sync this branch”


        今天github for windows同步推送遠端github出問題了,提交到本地沒問題,遠端一直推送不上去,挺棘手的,試了幾個網上的方法不管用。問題如下,報這個錯:

failed to sync this branch.

You might need to open a shell and debug the state of this repo.

 

經過幾輪摸索,終於找到一個解決方法,如下圖所示,在github for windows界面點擊右上角的設置圖標,選擇”Open in git Shell “打開Shell窗口

先用命令”git pull“拉去遠程github上代碼,再用"git push"把已經提交到本地的代碼推送提交到遠程github上即可,成功!

雖然能用shell命令窗口成功推送遠端,但是這樣還是沒能解決github for windows可視化界面無法推送到遠端github的問題,如有大神能解決,請多多指教。

 


免責聲明!

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



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