[英]In which cases git merge --no-ff is not keeping the commit history?
我有一個名為devel
的開發分支,一個名為feature_1
的功能分支和一個名為testing
的測試分支。 這是我所做的:
feature_1
從devel
分支 feature_1
已合並到testing
feature_1
上發現了一些錯誤(帶有--no-ff
) feature_1
進行了其他提交 devel
,並且feature_1
尚未重新建立基礎 feature_1
已通過--no-ff
再次合並到testing
) testing
中的所有testing
均成功完成,並且feature_1
分支可以合並回devel
--no-ff
將feature_1
合並到devel
,但是沒有合並復制在feature_1
分支上創建的所有提交,而是僅創建了一個合並提交,說feature_1
分支已被合並。 誰能解釋為什么--no-ff沒有保留提交歷史記錄? 我傾向於說這是因為feature_1
分支尚未針對devel
,但我不確定。
與git rebase
相反,默認情況下git rebase
會保留提交的歷史記錄,而git merge --no-ff
在設計時生成一次提交。
因此,將feature_1
與--no-ff
合並為devel
后,您看到的是正常的。
--no-ff
即使合並解析為快進,也要創建合並提交。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.