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,520 points
3,181 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,350 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,460 points
1,094 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,700 points
2,351 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,620 points
14,109 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,035 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
2,259 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,350 points
1,253 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP