Git Your branch is ahead of 'origin/master' by X commits解決方法


 

You get that message because you made changes in your local master and you didn’t push them to remote. You have several ways to “solve” it and it normally depends on how your workflow looks like:

  • If you work in another way and your local changes should be pushed then just
 git push origin

  

assuming origin is your remote

  • If your local changes are bad then just remove them or reset your local master to the state on remote

 

git reset --hard origin/master

  

 

 
 

來自為知筆記(Wiz)




免責聲明!

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



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