Skip to content

Instantly share code, notes, and snippets.

@scarf005
Last active January 2, 2025 07:09
Show Gist options
  • Save scarf005/19d583548ee6010c7b675809cc8430e8 to your computer and use it in GitHub Desktop.
Save scarf005/19d583548ee6010c7b675809cc8430e8 to your computer and use it in GitHub Desktop.
# reset author and email while keeping date correct
# https://stackoverflow.com/questions/750172/how-do-i-change-the-author-and-committer-name-email-for-multiple-commits/1320317#1320317
# https://stackoverflow.com/a/72930891/13503626
GIT_EDITOR=: git -c rebase.instructionFormat='%s%nexec GIT_AUTHOR_DATE="%ci" GIT_COMMITTER_DATE="%ci" git commit --amend --no-edit --allow-empty --allow-empty-message --reset-author' rebase -i --root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment