Skip to content

Instantly share code, notes, and snippets.

@seLain
Created August 19, 2018 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seLain/4ec25de9fafebebf449e12547a21fb0b to your computer and use it in GitHub Desktop.
Save seLain/4ec25de9fafebebf449e12547a21fb0b to your computer and use it in GitHub Desktop.
Change author of specific commit
https://stackoverflow.com/questions/3042437/how-to-change-the-commit-author-for-one-specific-commit
git rebase -i <earliercommit>
for each commit you want to change:
change the text from "pick" to "edit"
git commit --amend --author="Author Name <email@address.com>"
git rebase --continue
git rebase --continue
done
alternatively, doing amend without open editor:
git rebase -i <earliercommit>
for each commit you want to change:
change the text from "pick" to "edit"
git commit --amend --reset-author --no-edit --author="Author Name <email@address.com>"
git rebase --continue
git rebase --continue
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment