Change timestamps while rebasing git branch

I have reorganized the commits in a branch before it is going to be made public causing the timestamps of the commits to be in an mixed up order. I would rather have them be all be today with only seconds in between.

Obviously these time stamps won't be correct either, but since this is the time when things go public I prefer that over a mixed up history, time-wise.

So how do I tell git to create new timestamps while rebasing?


Solution 1:

Use --ignore-date:

git rebase --ignore-date

Solution 2:

In my case rebasing changed timestamps to CommitDate value, so in gitweb a bunch of months old commits showed up as 4 days old. I found the last commit with the correct date and did:

$ git rebase --committer-date-is-author-date SHA