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 ...

  1. git rebase -i B Specify
  2. Edit C and D to
  3. once When the rebase begins, it will stop you at C
  4. git committance - - - - author = "author's name & lt; Email@address.com> "
  5. Then git rebase --continue
  6. Hold it again on D
  7. then you git commit --amend --author = "author's name & lt; email@address.com>" again
  8. git rebase - will continue
  9. Rebase will be completed.

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -