The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

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

MisesEnForce
October 5, 2016

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

5 votes
Answer accepted
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 6, 2016

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 ...

 

MisesEnForce
October 6, 2016

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

TAGS
AUG Leaders

Atlassian Community Events