Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change the author name and email of all previous commit?

chihung93
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 30, 2018

I do not want the customer to see the wrong email/name on git.


How can I change all email, name of all old commit?

Please guide me step by step, because I'm just a Git beginner.

Thank you.

 I tried this script for a Bitbucket repo, without success :

git filter-branch --commit-filter \ 'if [ "$GIT_AUTHOR_NAME" = "OldAuthor Name" ]; then \ export GIT_AUTHOR_NAME="Author Name";\ export GIT_AUTHOR_EMAIL=authorEmail@example.com;\ export GIT_COMMITTER_NAME="Commmiter Name";\ export GIT_COMMITTER_EMAIL=commiterEmail@example.com;\ fi;\ git commit-tree "$@"'

1 answer

0 votes
Ben Stuart
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 28, 2018

You can use steps outlined in Git or Hg Repository exceeds number of allowed Committers. There is a collapse section that contains a script that should work for you. Hope that helps! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events