Skip to content

Instantly share code, notes, and snippets.

@ferrerojosh
Last active May 4, 2024 09:35
Show Gist options
  • Save ferrerojosh/592c5801e611e080f28ba16943141639 to your computer and use it in GitHub Desktop.
Save ferrerojosh/592c5801e611e080f28ba16943141639 to your computer and use it in GitHub Desktop.

Run (Unix):

git -c rebase.instructionFormat='%s%nexec GIT_AUTHOR_DATE="%ai" GIT_COMMITTER_DATE="%ci" git commit --amend --no-edit --reset-author' rebase -r --root

Run (Windows):

git -c rebase.instructionFormat="%s%nexec GIT_AUTHOR_DATE="""%ai""" GIT_COMMITTER_DATE="""%ci""" git commit --amend --no-edit --reset-author" rebase -r --root

Sources: https://www.reddit.com/r/git/comments/jp59k5/deleted_by_user/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment