交互式变基显示出比我要求的提交更多的提交 [英] Interactive rebase shows me more commits than I'm asking for

查看:93
本文介绍了交互式变基显示出比我要求的提交更多的提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想进行交互式变基,所以我: git rebase -i HEAD~5,但是我得到的不止是five提交.为什么会这样?

I want to do an interactive rebase so I: git rebase -i HEAD~5, but I'm getting more than five commits. Why could it be?

推荐答案

有时,合并仅算作1次提交,但它将显示合并中分支中的所有提交.因此,如果您有1次提交,1次合并,1次提交并重新设置-i HEAD〜3的基数,则可能会获得合并中的所有提交以及两个最终提交(三个以上).

Sometimes a merge counts as only 1 commit, but it will show all the commits from the branch in the merge. So if you had 1 commit, 1 merge, 1 commit and you rebase -i HEAD~3 you might get all the commits in the merge along with the two end commits (which is more than three).

这篇关于交互式变基显示出比我要求的提交更多的提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆