To ensure your commits in Bitbucket appear with the correct user, the email address you commit with locally must match a validated email address on your account. To associate your email address with local commits, Git and Mercurial allow you to configure a global username/email and an optional repository-specific username/email. If you don't specify repository-specific values, the commit defaults to using the global values you set.
For example, if your Bitbucket account has a validated email address of
firstname.lastname@example.org, you can set your repository configuration for that username.
Whether or not you set a repository-specific value, make sure you set your global username/email address. If the global default is not configured or if you haven't validated your email address, the committer appears as unknown next to your commit. In addition, if you have multiple Bitbucket accounts, you may mistakenly commit your code under an email address that maps to an account you didn't intend.
To map existing commits on a repository to a different account, you can add aliases to the Username aliases of the repository. To set up a username alias, you must have admin rights to the repository.
For information about configuring your username or aliases, see Map existing commits to username aliases.