Skip to content

Instantly share code, notes, and snippets.

@nb5p
Last active December 19, 2019 08:02
Show Gist options
  • Select an option

  • Save nb5p/b773c43934f7a254b6225a58b330a1aa to your computer and use it in GitHub Desktop.

Select an option

Save nb5p/b773c43934f7a254b6225a58b330a1aa to your computer and use it in GitHub Desktop.
Rewrite Git Author And Committer After Rename GitHub Username.
git config --global user.name "nb5p"; git config --global user.email "2098464+nb5p@users.noreply.github.com"
git filter-branch -f --commit-filter '
GIT_AUTHOR_NAME="nb5p";
GIT_AUTHOR_EMAIL="2098464+nb5p@users.noreply.github.com";
GIT_COMMITTER_NAME="nb5p";
GIT_COMMITTER_EMAIL="2098464+nb5p@users.noreply.github.com";
git commit-tree "$@";
' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment