Change the author and committer name and e-mail of multiple commits in a bitbucket git repository

Hello,

I am specialist into having a repo where I am working alone but where I end up commit with various accounts etc, which ends up being quite messy. Usually, to sort things out and rewriting history so that there's only one commit name, mail etc, I resort to this solution :

http://stackoverflow.com/questions/750172/change-the-author-and-committer-name-and-e-mail-of-multiple-commits-in-git

This time, I tried this for a Bitbucket repo, without success. Is there something special ?

1 answer

1 accepted

Accepted Answer
1 vote

As you have already changed your commit author within your local repository: why not just use a forced push, to push your local changes to the remote server? (*git push --force*)

Caution:

  • Forcing pushes is not a good practice (http://willi.am/blog/2014/08/12/the-dark-side-of-the-force-push/)
  • Rewriting the author/committer creates NEW commits - mostly replacing the old commits. When you have had for example tags on your repository before your change of author, the tags are not moved to the new commits, as the tags are pointing to a certain SHA1 and this stays the old commit. You might have to transfer your tags etc. as well (probably manually) when rewriting author in your repository - unless you will loose your tags ...

 

I don't why I didn't, as it made my day. Thx !

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

2,377 views 9 12
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you