我通过运行git rebase -i <commit-yesterday>
并选择reword
选项进行重新基准化来编辑提交消息。之后,我运行push --force
将更改发布到远程存储库。我的期望是,当我运行git log
时,会看到类似以下的列表:
commit 11111111
Date: Today 16:00:00
Message: The commit created Today at 16:00:00
commit 22222222
Date: Today 14:00:00
Message: The commit created Today at 14:00:00
commit 33333333
Date: Today 10:00:00
Message: The commit created Today at 10:00:00
commit 44444444
Date: Yesterday 15:00:00
Message: The message of this commit updated Today at 17:00:00 while it was created yesterday at 15:00:00
但是我看到以下列表,更新的提交以旧提交日期和新提交ID居于顶部,并且旧提交显示有其旧消息和旧提交ID:] >
commit 55555555
Date: Yesterday 15:00:00
Message: The message of this commit updated Today at 17:00:00 while it was created yesterday at 15:00:00
commit 11111111
Date: Today 16:00:00
Message: The commit created Today at 16:00:00
commit 22222222
Date: Today 14:00:00
Message: The commit created Today at 14:00:00
commit 33333333
Date: Today 10:00:00
Message: The commit created Today at 10:00:00
commit 44444444
Date: Yesterday 15:00:00
Message: The commit created Yesterday at 15:00:00
我通过运行git rebase -i
[git rebase -i 44444444
将显示来自44444444
的提交,但不包括44444444
。