Change timestamps while rebasing git branch

2019-01-30 02:53发布

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?

2条回答
Emotional °昔
2楼-- · 2019-01-30 03:11
git rebase --ignore-date
查看更多
该账号已被封号
3楼-- · 2019-01-30 03:37

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
查看更多
登录 后发表回答