How to change commit username in bitbucket account ? To change in git I have used this command
git filter-branch -f --env-filter " GIT_AUTHOR_NAME='newUser' GIT_AUTHOR_EMAIL='newuser@email.com' " HEAD
It only change username in local machine but not in my bitbucket account. How to change committed username in bitbucket ?
Like (almost) everything else with Git, this command only modifies your local repository. Just like when you commit or add a tag, you will have to push to BitBucket in order to make the changes show up.
But before you do, be very sure that you want to.
The filter-branch
command that you ran rewrote your history. Each of your commits now has a new hash. It is considered bad practice to rewrite history that has been shared with others, and if you push to BitBucket you'll be doing that.
This can cause real problems, most obviously because anybody else who has cloned the repository will now have history that is no longer reflected in the repository. They will have trouble push
ing and fetch
ing (or pull
ing). If you choose to go forward, it is best to carefully and honestly communicate with all of your collaborators.
If you are very, very sure that you want to do this, you'll have to use the --force-with-lease
option to push, or else BitBucket will reject the push.