Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gschema/2e327f083709edc014b33020de0aed76 to your computer and use it in GitHub Desktop.
Save gschema/2e327f083709edc014b33020de0aed76 to your computer and use it in GitHub Desktop.
Changing author info (email and name) in Git repository

Change author info for all commits (sledgehammer approach)

Copy/paste into a command line:

git filter-branch --commit-filter '
  GIT_COMMITTER_NAME="Your Name";
  GIT_AUTHOR_NAME="Your Name";
  GIT_COMMITTER_EMAIL="your.email@example.com";
  GIT_AUTHOR_EMAIL="your.email@example.com";
  git commit-tree "$@";
' HEAD

Note: for more info and fine grane control check out Github's article: https://help.github.com/en/github/using-git/changing-author-info

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