git - Change commit author at one specific commit -
I want to change the author of a special commitment in history. This is not the final commitment.
I know about this question -
But I'm thinking about something, where I identify the commitment by hash or short-hash.
Close the interactive rebus from a point in history, which you need to modify ( Git rebase -i & lt; previouscommit & gt;
). In the list of comments to be remanded, change the text that pick
to edit
next to the hash with the one you want to modify. Then when git prompts you to change the commit, use it:
git commit --amend --author = "Author's name & lt; email@address.com>"
For example, if your commute history is with ABCDEF
with F
as head
, And you want to change the author of c
and D
, then you ...
-
git rebase -i B Specify
- Edit
C
andD
to - once When the rebase begins, it will stop you at
C
-
git committance - - - - author = "author's name & lt; Email@address.com> " - Then
git rebase --continue
- Hold it again on
D
- then you
git commit --amend --author = "author's name & lt; email@address.com>"
again -
git rebase - will continue
- Rebase will be completed.
Comments
Post a Comment