Use 'git filter-branch' to correct committer dates in last N commits?

后端 未结 1 1620
無奈伤痛
無奈伤痛 2021-02-14 01:39

I recently needed to apply 16 patches to my repo, using \'git am\', and I was careful to use \'--committer-date-is-author-date\' for each one. However, I also needed to adjust

相关标签:
1条回答
  • 2021-02-14 02:00

    The value of $GIT_AUTHOR_DATE contains spaces, so you have to quote it (-0500 is your time zone offset):

    git filter-branch --env-filter \
      'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"' SHA1..HEAD
    
    0 讨论(0)
提交回复
热议问题