Reputation: 545
I am having a trouble with old repository in bitbucket which is: for all my old commit before 2018 I receive this error message
the point is it is me who pushed those commits. is there any way that I can map those commits to my account? thanks in advance.
Upvotes: 8
Views: 5143
Reputation: 1053
Alternatively, you don't have to rewrite history (which will, among other things, break all current tags, or at least knock them off-branch) if you just file your old e-mail address as an "alias".
To add an email alias:
Select the Settings cog ⚙️ on the top navigation bar.
Select Personal Bitbucket settings from the Settings dropdown menu.
Select Email aliases under General.
From the Email aliases page, enter your email address in the Enter email address field.
Click Add.
To remove an email alias, click the x icon to the left of the alias.
Upvotes: 2
Reputation: 1324757
That means the author settings (git config user.name
and git config user.email
) was incorrect for those past commits.
You would need to change the email on past commits (as in here) and then force push that branch back to your remote repo, in order for those commits to be associated to your account.
If you are the only one working on that repository, this can be done without any adverse consequences.
Upvotes: 5