Skip to content

Instantly share code, notes, and snippets.

@n8e
Created November 24, 2017 07:39
Show Gist options
  • Save n8e/96ba269e631bb7931daea8bbf7922c38 to your computer and use it in GitHub Desktop.
Save n8e/96ba269e631bb7931daea8bbf7922c38 to your computer and use it in GitHub Desktop.
To change the author of all the commit messages in a branch

Use this when you need to change the author of all the commit messages in a branch. git filter-branch -f --env-filter "GIT_AUTHOR_NAME='n8e'; GIT_AUTHOR_EMAIL='[email protected]'; GIT_COMMITTER_NAME='n8e'; GIT_COMMITTER_EMAIL='[email protected]';" HEAD

After this, then git push origin +<git branch> to force push the changes to the repository

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