<分区>
假设我的存储库中有以下历史记录:
E--F
/
A--B--C---D
我想修改成这样:
E--F
/ \
A--B--C---D
我不想修改revisions的文件内容,只想“画个 merge 箭头”。我该怎么做?
我尝试通过以下命令执行此操作:
git checkout D
git merge F -s ours --no-ff --no-commit
git commit --amend
但我收到以下错误信息:
fatal: You are in the middle of a merge -- cannot amend.
我想保留提交信息不变(作者、日期、消息)。我唯一想更改的是将伪 merge 信息添加到提交中。