Skip to content

Instantly share code, notes, and snippets.

@rodrigomelo9
Last active June 7, 2024 16:42
Show Gist options
  • Save rodrigomelo9/a64749639011d916abdaebfbc2de260c to your computer and use it in GitHub Desktop.
Save rodrigomelo9/a64749639011d916abdaebfbc2de260c to your computer and use it in GitHub Desktop.
Fix the email in the commits of a branch
* git config [--global] user.email "new@email.com"`
* git config [--global] user.name "New name"
* git log (find previous commit reference)
* git rebase -i <previous commit reference> -x "git commit --amend --reset-author -CHEAD"
* Verify and close the opened editor
* git log (to verify)
* git push --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment