Skip to content

Instantly share code, notes, and snippets.

@karancode
Created May 1, 2020 06:00
Show Gist options
  • Select an option

  • Save karancode/c00442c2d20cbefc3370a1b07e1ff484 to your computer and use it in GitHub Desktop.

Select an option

Save karancode/c00442c2d20cbefc3370a1b07e1ff484 to your computer and use it in GitHub Desktop.
force update your git username and email after commits have been pushed with undesired user info.
$ git filter-branch -f --env-filter "GIT_AUTHOR_NAME='<new_username>'; GIT_AUTHOR_EMAIL='<new_email>'; GIT_COMMITTER_NAME='<new_username>'; GIT_COMMITTER_EMAIL='<new_email>';" HEAD
$ git push -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment