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,090 points
100 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
• 39,330 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
51 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,530 points
31 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
117 views
+13 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,380 points
124 views
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
106 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
• 39,330 points
71 views