Skip to content

Instantly share code, notes, and snippets.

@Nixes
Created January 18, 2017 05:16
Show Gist options
  • Save Nixes/a5732e7440902991255281eea2ac467f to your computer and use it in GitHub Desktop.
Save Nixes/a5732e7440902991255281eea2ac467f to your computer and use it in GitHub Desktop.
Commands to change git / github commit email and user references
git pull
git filter-branch -f --env-filter 'if [ "$GIT_AUTHOR_EMAIL" = "some_old_email@mail.com" ]; then GIT_AUTHOR_EMAIL=some_new_email@mail.com; GIT_AUTHOR_NAME="Github_username"; GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL; GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; fi' -- --all
git push origin master --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment