You’ll have to update your author email address, which Github uses to assign commits to an account. You might want to also update your author name to match. Note that you can set these globally, but you can also override the global value for a particular repository, which might be useful if you use different identities for different repositories.
You can change past commits by rewriting history. Note that this will make things complicated for anyone you have shared the repository with, they will have to manually accept the change. Depending on how many commits you want to change you might either used
git rebase -i and edit each commit in turn, or use a bulk approach with
git filter-branch (described at the end of the article linked below).