Intellij annotate shows wrong date after git rebase

I had to do a pretty big git reload which resulted in conflicts for many files. In some cases I had to rewrite parts of the code to make it compatible, not just using the upstream or downstream version of the line / block.

So far, no problem! Once I resolved all conflicts, my git log looks as expected and the history has changed.

However , using Annotate in Intellij, rebased commits show the date when the redirect was performed.

Now I have the same history (hash-hash is the same), over several commits, with two different dates. Am I messed up something or is this intended behavior

+3


source to share


1 answer


I don't know if this is the intended behavior (i.e. I did some research on the internet 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 matches the rebase date.

A little (necessary) git theory

Rebase creates new commits, this is how git works. But git knows the old and new commits are linked, so it stores both the original date (author date) and the reinstall date (commit date) in the new commit.



You can see both dates in the git log using the option --pretty=fuller

Fun fact

IntelliJ displays the commit date and author.

Freeze date display can be an option. But in this case, I would show the Committer along with the commit date. Another option is to show the date of the author and author.

It seems to me that IJ is mixing things up, but maybe there is a reason for that

+3


source







All Articles