Why does git rebase --onto a b, git rebase --onto b a create a different SHA1 from the original? -
suppose have following revision graph, c current branch:
c    \ /   b git rebase --onto b creates following:
    c    /    / b and git rebase --onto b a returns graph to:
c    \ /   b however, new sha1 of c different old sha1 of c, before both rebasings. why case?
the sha1 of commit depends on commit, including metadata. in particular, depends on commit timestamp. twice-rebased commit has new timestamp, has new sha1.
(note there's "author date", when written, , "commiter date", when actual commit recorded. latter has changed. see yourself, use git log --pretty=fuller, or @ commit in gitk.)
Comments
Post a Comment