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

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

mef Oct 05, 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

4 votes
Answer accepted
Johannes Kilian Oct 06, 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 ...

 

mef Oct 06, 2016

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

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,652 views 1 18
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