[英]Git use old version of commit to rebase
I have two branchs in my project, feature and develop. 我在项目中有两个分支,分别是功能和开发。 I commit and push my edited code to my feature branch two times(commit1 and commit2, the second one is the latest version).
我提交并两次将编辑后的代码推送到功能分支(commit1和commit2,第二个是最新版本)。 The problem is when I want to rebase my develop branch with my feature branch, it use commit1 version to rebase.
问题是当我想用我的功能分支为我的开发分支重新设置基础时,它使用commit1版本进行重新设置。 How to fix this problem?
如何解决这个问题?
As in " Undoing a git rebase ", check the output of git reflog
and: 与“ 撤消git rebase ”中一样,检查
git reflog
的输出并:
feature
to what it was before the rebase feature
重置为变基前的状态 develop
branch develop
分支相同 Then try again your rebase, paying attention to conflict resolution and rebase status. 然后再尝试重新设置基准,请注意冲突的解决和复位状态。
Finally push --force
one more time. 最后
push --force
一次。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.