I widely use the git rebase --interactive
technique, as this allows to keep the history lean and mean. For example, if I have a branch of 3 commits: a->b->c
, and then I discover that the commit a
has a misprint, I would prefer to modify the commit a
directly instead of creating a commit d
that fixes the issue. For sure the history changes (we have now a branch of a'->b'->c'
commits), but the dates shown in git bash reflect the initial history of the commits. In other words, if the commit a
is created yesterday, the commit a'
also has this creation date as shown in git log
.
But that is not true if the history is viewed from the Bitbucket commits history. Somehow Bitbucket ignores the dates that git bash uses, and shows the actual dates of modification (e.g. today).
So my first question is: which dates do git bash and Bitbucket use, and what is the difference? The follow up question is more practical: what is the best way to perform the interactive rebase that preserves the dates of commits as shown in Bitbucket?