Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I change commit author?

I'm a novice, and I need to correct the author name in my initial commits.  I'm reading the excellent Bitbucket documentation, particularly the chapter on "undoing changes", but nothing seems to work: No matter what I try, the commits with the bad author name remain in my local file and also in the Bitbucket file If there is no way to fix this, can I just start over from scratch?

1 answer

0 votes
Mikael Sandberg Community Leader Sep 03, 2020

Hi @malikmuzammal2,

The author is based on what is specified in your Git config settings, and you can change the settings by running these two commands:

git config --global user.name "your name"

git config --global user.email "your email"

To change the author on the latest commit you have to run this command:

git commit --amend --author="Author Name <email@address.com>" 

If the commit is not the latest commit, you should have to do a rebase to get back to the specific commit to change it. Have a look at this KB on how to do it.

Note that all these commands are run locally in your copy of the repsitory and then pushed back to Bitbucket. Also, make sure that the user is set up correctly in Bitbucket, it uses the email address to identify the author. So if you have two users with the same email Bitbucket will show the author as the first user it encounters in the user directory that has that email.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

485 views 5 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you