Skip to content

Instantly share code, notes, and snippets.

@liuderchi
Created September 23, 2016 03:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liuderchi/3a26dbea5484ec10f1708db2089ee8c8 to your computer and use it in GitHub Desktop.
Save liuderchi/3a26dbea5484ec10f1708db2089ee8c8 to your computer and use it in GitHub Desktop.
git rename author info of commit

setup author info of past commits

  • $ git rebase -i {{base_commit|--root}}
  • edit all 'pick' to 'edit' then save
  • do following for each commit:
    • $ git commit --amend --author="Author-Name <email@address.com>"
    • $ git rebase --continue

setup author info of future commits

  • $ git config user.name "{{new_name}}"
  • $ git config user.email "{{new_email}}"
@ameaninglessname
Copy link

thanks!

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