码迷,mamicode.com
首页 > 其他好文 > 详细

Your branch is ahead of 'origin/master' by 21 commits.

时间:2019-06-25 15:01:45      阅读:97      评论:0      收藏:0      [点我收藏+]

标签:cal   提示   https   commit   comm   img   内容   拉取   参考   

当切换到主分支后,准备 git pull 拉取远程 master 分支时,提示本地主分支显示有 21 个commits

技术图片

 

问题原因:

因为你修改了 local master 本地的主分支,可以选择以下方法之一:

保持本地 master 的内容,使用 git push origin,将本地的修改直接提交到远程

或者删除本地分支所有修改,同步远程 master 到本地,使用 git reset --hard origin/master

 

参考链接:

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

 

Your branch is ahead of 'origin/master' by 21 commits.

标签:cal   提示   https   commit   comm   img   内容   拉取   参考   

原文地址:https://www.cnblogs.com/ryanzheng/p/11082566.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!