Change a commit author for a specific commit

0 votes
I’m trying to change the author of a specific commit in the history(it was not the last commit)

How do I do it?
Aug 17, 2018 in Git & GitHub by Hannah
• 14,080 points
74 views

1 answer to this question.

0 votes

You can use interactive rebase.

git rebase -i <earliercommit>

In the list of commits being rebased, change the text from pick to edit next to the hash of the one you want to modify. Then when git prompts you to change the commit, use this:

git commit --amend --author="Author Name <email@address.com>"
answered Aug 17, 2018 by Kalgi
• 37,420 points

Related Questions In Git & GitHub

0 votes
1 answer
0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,280 points
37 views
0 votes
1 answer

How to forcefully commit a file to Git even if the file is ruled as unchanged?

This is simple, just follow the below ...READ MORE

answered Jul 11, 2018 in Git & GitHub by Sophie may
• 9,430 points
26 views
0 votes
1 answer

How to do a re-merge into another branch in git

Seems like you want to rebase your ...READ MORE

answered May 7, 2018 in Git & GitHub by DareDev
• 6,810 points
96 views
+13 votes
2 answers
0 votes
1 answer
0 votes
3 answers

Change commit message after committing and before push.

You also can use git filter-branch for that. git filter-branch ...READ MORE

answered Sep 6, 2018 in Git & GitHub by lina
• 8,100 points
91 views
0 votes
1 answer

Where to store credentials for devops?

You can use any of the various ...READ MORE

answered Jul 23, 2018 in Git & GitHub by Kalgi
• 37,420 points
56 views