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
• 18,570 points
2,177 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
• 52,370 points

Related Questions In Git & GitHub

0 votes
1 answer

How to change the URL for a remote Git repository?

Hi@akhtar, You can use the git remote command ...READ MORE

answered Nov 21, 2020 in Git & GitHub by MD
• 95,300 points
127 views
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,670 points
951 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
• 10,550 points
3,079 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,259 views
+2 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,220 points
1,052 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
• 52,370 points
457 views