The below method works in my case at least.
- On GitHub web page, change a branch name (main –> main1 for example). It updates a contributor list on my GitHub repository dashboard.
- Then change it back (main1 –> main).
I have multiple GitHub accounts for different projects. Each for different community.
But accidentally, I pushed a commit using a wrong account. I changed the author of the commit, but the wrong account was still on the contributor list on GitHub dashboard. My method keeps commit history as well as GitHub action settings and issue history. But I did not check if pull requests are kept.