git - Change commit author at one specific commit -


i want change author of 1 specific commit in history. it's not last commit.

i know question - how change author of commit in git?

but thinking something, identify commit hash or short-hash.

interactive rebase off of point earlier in history commit need modify (git rebase -i <earliercommit>). in list of commits being rebased, change text pick edit next hash of 1 want modify. when git prompts change commit, use this:

git commit --amend --author="author name <email@address.com>" 

for example, if commit history a-b-c-d-e-f f head, , want change author of c , d, would...

  1. specify git rebase -i b
  2. change lines both c , d edit
  3. once rebase started, first pause @ c
  4. you git commit --amend --author="author name <email@address.com>"
  5. then git rebase --continue
  6. it pause again @ d
  7. then git commit --amend --author="author name <email@address.com>" again
  8. git rebase --continue
  9. the rebase complete.

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -