Skip to content

Instantly share code, notes, and snippets.

@Bobsans
Created February 7, 2022 13:34
Show Gist options
  • Select an option

  • Save Bobsans/dc5a6f21dc298eb09c2be1c0e2c3605d to your computer and use it in GitHub Desktop.

Select an option

Save Bobsans/dc5a6f21dc298eb09c2be1c0e2c3605d to your computer and use it in GitHub Desktop.
Change commit author in git history
git filter-branch -f --env-filter '
if test \"$GIT_AUTHOR_NAME\" = \"User\"; then export GIT_AUTHOR_NAME=\"New User\" GIT_AUTHOR_EMAIL=\"user@mail.com\"; fi
' -- --all
git push --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment