How do I assign my username and email to old commits?

Hi! I’m a newbie. I just realised I’ve been making commits without connecting my username/email to git. Now I want to authorise all my old commits, is there any way to do that?

Thanks in advance

Do you mean you need to update the email address in those old commits? In that case you’ll have to look into rewriting the repository history:

There’s a section “Changing Email Addresses Globally” at the bottom of that page. Note that if you’ve shared the repository with others they’ll have to manually accept that rewritten history.

1 Like