Skip to content

Instantly share code, notes, and snippets.

@rlaphoenix
Created February 25, 2023 22:27
Show Gist options
  • Save rlaphoenix/0d6407a647f423c452679fc9039afc99 to your computer and use it in GitHub Desktop.
Save rlaphoenix/0d6407a647f423c452679fc9039afc99 to your computer and use it in GitHub Desktop.
Keep commit author date/time timestamps on GitHub after squashing/merge/rebase
`git checkout the_branch`
`git rebase --committer-date-is-author-date -i HEAD~35`
Where HEAD~35 is the latest 35 commits that you want to keep the dates of.
You could do `git rebase --committer-date-is-author-date -i --root` but I don't recommend it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment