On the command line, navigate to the repository that contains the commit you want to amend.
Type git commit --amend and press Enter.
In your text editor, edit the commit message, and save the commit. You can add a co-author by adding a trailer to the commit.
Source: https://help.github.com/en/github/committing-changes-to-your-project/changing-a-commit-message
Need to find the commit that introduced a bug?
Use git bisect.
You use it by first telling it a "bad" commit that is known to contain the bug, and a "good" commit that is known to be before the bug was introduced.
https://blog.ploeh.dk/2020/10/05/fortunately-i-dont-squash-my-commits/