Situation
I’ve written and commited the post My Git Command List (3),
but after a while, I changed that post. In order not to complexify
my Git commit history, I used git commit --amend -a
. That’s quite
simple and convenient. I observed that the displayed time in the
amended commit was the same as the original one, whereas the SHA-1
hash was changed so that Git knows that they’re different.
However, from
Git Object ID Generation (1): Blobs and Commits, I’ve learnt
that the ID of Git commit objects is totally determined by
- the content of the commit message
- the commit time
- the author
In this case, no difference of the above factors between the original
commit and the amended commit can be observed with git show
.
Problem
In what way do the original commit and the amended commit differ?