[英]Updates were rejected, because the tip of your current branch is behind… Not true
Updates were rejected, because the tip of your current branch is behind its remote counterpart. 更新被拒绝,因为当前分支的尖端在其远程对应的后面。
I know, how to resolve it, however, the subject of my question is different. 我知道,如何解决它,但是,我的问题的主题是不同的。
first-branch
我将第二支公司重新划分为first-branch
first-branch
into second-branch 我将first-branch
改为第二分支 How come remote repository is ahead of me (I am behind), when I have 2 local commits and only 1 remote commit? 当我有2个本地提交而只有1个远程提交时,远程存储库又如何领先于我(我落后于我)?
What I am missing? 我缺少什么? Thank you. 谢谢。
EDIT: 编辑:
What does "I rebased into second-branch into first-branch" mean? “我从第二分支重新划分为第一分支”是什么意思? That you rebased second-branch onto the tip of first-branch? 您是否将第二分支重新定位到第一分支的顶端?
Sorry, I did not pay attention to my grammar for a while. 抱歉,我有一段时间没有注意我的语法。 I corrected it 我改正了
"I rebased second-branch into first-branch" means “我将第二分公司改成第一分公司”是指
git checkout first-branch git checkout第一分支
git rebase second-branch git rebase第二分支
After the first push your local and remote branches look like this: 第一次推送后,您的本地和远程分支如下所示:
first-branch A
second-branch B
After the rebase of first-branch onto second-branch, they look like this: 将第一个分支重新设置为第二个分支后,它们如下所示:
first-branch B-A'
second-branch B
When you attempt to push first-branch, your local branch is two commits ahead of the remote ( B
and A'
) and the remote is one commit ahead of your local branch ( A
). 当您尝试推动第一分支时,本地分支比远程分支( B
和A'
)提前两个提交,而远程分支比本地分支( A
)提前一个提交。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.