我编辑了旧的提交消息,但git log显示了已编辑的提交,其日期比最近创建的提交要早。

问题描述 投票:1回答:1

我通过运行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 并选择reword选项进行重新基准化来编辑提交消息。之后,我运行push --force将更改发布到远程存储库。我的...

git rebase
1个回答
0
投票

[git rebase -i 44444444将显示来自44444444的提交,但不包括44444444

© www.soinside.com 2019 - 2024. All rights reserved.