无法重新建立主分支
我有两个分支:master
和 experimental
。我想将我在实验中所做的更改重新设置为主版本。但是每当我尝试使用 git rebase masterexperimental 来执行此操作时,我都会得到:Currentbranchexperimental is up to date. 有人知道我做错了什么吗?谢谢。
I have two branches: master
and experimental
. I'd like to rebase the changes I've made in experimental onto master. But whenever I attempt to do so with, git rebase master experimental
, I get: Current branch experimental is up to date.
Anyone know what I'm doing wrong? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这意味着实验分支已经是主分支的后代。如果您想要从 master 上的实验分支提交,您需要合并它。由于您重新设置了基础,因此它将是一个快进提交,不会导致合并提交(除非您指定 --no-ff):
This means that the experimental branch is already a descendant of the master branch. If you want the commits from experimental branch on master you need to merge it. Since you rebased it will be a fast-forward commit that doesn't result in a merge commit (unless you specify --no-ff):