I had to do a quite big git rebase, which resulted in conflicts for many files. In some cases I had to rewrite parts of the code to make it compatible, not only using the up steam or down stream version of the line/block.
So far no problems! Once I resolved all conflicts my git log looks as expected, and history changed.
However, by using Annotate in Intellij the rebased commits shows the date of when the rebase was done.
I now have the same history, (commit hash is the same), over multiple commits, with two different dates. Did I mess up something or is this the intended behaviour
I don't know if this is the intended behavior (i.e. I did some research online but couldn't find anything), but this is what is happening:
Short answer
For some reason IntelliJ is showing the Commit date, which in your case corresponds to the date of the rebase.
A bit of (necessary) git theory
Rebase creates new commits, this is how git works. But git knows that the old and the new commits are related, so it saves in the new commit both the original date (author date) and the rebase date (commit date)
You can see both dates in git log using the option --pretty=fuller
Fun fact
IntelliJ is showing Commit Date and Author.
Showing commit date can be a choice. But in this case I would have shown the Committer, along with the commit date. The other option would have been to show Author and Author date.
It seems to me that IJ is mixing up things, but maybe there is a reason for that
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With