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...
- specify
git rebase -i b - change lines both
c,dedit - once rebase started, first pause @
c - you
git commit --amend --author="author name <email@address.com>" - then
git rebase --continue - it pause again @
d - then
git commit --amend --author="author name <email@address.com>"again git rebase --continue- the rebase complete.
Comments
Post a Comment