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)



posted @ 2018-08-09 14:40  佳明兄  阅读(5531)  评论(0)    收藏  举报

内容仅为参考使用,不保证内容的正确性,通过使用本博客内容随之而来的风险与作者无关。内容如有侵权,请通知删除!