致命:无法快速前进,中止 [英] Fatal: Not possible to fast-forward, aborting
问题描述
为什么Git不再允许我快速向前合并?如果我尝试使用-ff-only
强制执行此操作,则会收到消息致命:无法快速转发,中止".我意识到合并--no-ff
有很多优点,但是我很困惑为什么现在不能-ff-only
?
Why is Git not allowing me to fast forward merge anymore? If I try to force it using --ff-only
, I get the message "fatal: Not possible to fast-forward, aborting." I realize that there are huge advantages to merge --no-ff
, but I'm just puzzled why I can't --ff-only
now?
推荐答案
您的分支不再直接基于您尝试将其合并到的分支-例如另一个提交已添加到目标分支中,而该分支不在您的分支中.因此,您不能快进它(因为快进要求您的分支完全包含目标分支).
Your branch is no longer directly based off of the branch you're trying to merge it into - e.g. another commit was added to the destination branch that isn't in your branch. Thus, you can't fast-forward into it (because fast-forward requires your branch to completely contain the destination branch).
您可以在目标分支( git rebase< destination分支>
)的基础上重新建立分支,以对提交进行重新处理,以使它们可以快速转发到其中,或者可以进行常规合并
You can rebase your branch on top of the destination branch (git rebase <destination branch>
) to rework the commits such that they will fast forward into it, or you can do a regular merge.
这篇关于致命:无法快速前进,中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!