Skip to content

Instantly share code, notes, and snippets.

@robindegen
Created September 28, 2014 18:24
Show Gist options
  • Select an option

  • Save robindegen/5a69b24cea581a2909b4 to your computer and use it in GitHub Desktop.

Select an option

Save robindegen/5a69b24cea581a2909b4 to your computer and use it in GitHub Desktop.
Change name/email of all git commits (requires force push)
git filter-branch -f --env-filter \
"GIT_AUTHOR_NAME='Robin Degen'; GIT_AUTHOR_EMAIL='robindegen@gmail.com'; \
GIT_COMMITTER_NAME='Robin Degen'; GIT_COMMITTER_EMAIL='robindegen@gmail.com';" HEAD
@robindegenfei
Copy link
Copy Markdown

Or give a range with
git filter-branch -f --env-filter
"GIT_AUTHOR_NAME='Robin Degen'; GIT_AUTHOR_EMAIL='robindegen@gmail.com';
GIT_COMMITTER_NAME='Robin Degen'; GIT_COMMITTER_EMAIL='robindegen@gmail.com';" tempbranch..HEAD

Where tempbranch is created on the starting commit to change.

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