Skip to content

Instantly share code, notes, and snippets.

@robindegen
Created September 28, 2014 18:24
Show Gist options
  • Save robindegen/5a69b24cea581a2909b4 to your computer and use it in GitHub Desktop.
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='[email protected]'; \
GIT_COMMITTER_NAME='Robin Degen'; GIT_COMMITTER_EMAIL='[email protected]';" HEAD
@robindegenfei
Copy link

Or give a range with
git filter-branch -f --env-filter
"GIT_AUTHOR_NAME='Robin Degen'; GIT_AUTHOR_EMAIL='[email protected]';
GIT_COMMITTER_NAME='Robin Degen'; GIT_COMMITTER_EMAIL='[email protected]';" 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