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

 

(1)方法1:git fetch origin

(2)方法2(代码还需要):git push origin

(3)方法3 (代码不需要):git reset --hard origin/$branch

  参考:

  https://blog.csdn.net/Thousa_Ho/article/details/73350703

  https://stackoverflow.com/questions/16288176/your-branch-is-ahead-of-origin-master-by-3-commits

  可以先执行下git  diff $branch origin/$branch 看下差异

(4) git pull --rebase

(5)git pull origin cherryPick

  参考:https://blog.csdn.net/u010383937/article/details/72901675

 

文章来自:https://www.cnblogs.com/zndxall/p/9571224.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3