The comments ended up turning into an answer, so I will summarize them here:
I'm not sure if I can do this, or should the relevant authors do this? Of course, I want to keep the name of the author referring to their squash.
If you crush any commits, you will only get one commit, and commit can only have one author. They may still be referenced in the commit message (by default, Git), but you will lose personality for the literal author of the commit.
So I can not crush blue commits (into one) and then red commits (into one)? so there are two in PR?
Yes, you can do this, and there should be a crush that you offer in pull requests so that you carry only one commit for each of them. If you go through all the blue commits into one and all the red commits, you will achieve what I think you need to clear the git log while keeping the author’s history.
Excellent! .. any suggestions how to do this?
Sure. You can interactively repack to crush multiple commits together. Your problems will come when you have a red commit on either side of the blue commits, which limits your squash ability.
For blue commits, you can squash them into the first commit on the list when you execute git rebase -i HEAD~11 (which loads over the last 11 commits for an interactive reboot).
I mocked some dummy commits for use as an example:
$ git log --oneline 7e8be9c Red b740f97 Blue 325b375 Blue 553d733 Red bb5599b Red
In your console, select “p” or “pick” for the first blue commit in the list (bd63d63) and for everyone else, give it “f” or “fixup” to cancel your commit messages or “s” or “squash”, if you want to keep commit messages for them:
$ git rebase -i HEAD~5 pick bb5599b Red pick 553d733 Red pick 325b375 Blue fixup b740f97 Blue pick 7e8be9c Red
When the reboot finishes, your blue commits will be crushed together:
$ git log --oneline a341d97 Red 488c19e Blue 553d733 Red bb5599b Red
Here it can get complicated depending on whether Red and Blue have touched the same files or not.
If you don’t have one, it’s best to cherry-pick blue commit into a separate branch (without red or blue) or reconfigure it, reload the original and crush the red commits, and discard the Blue commit, then reinsert the temporary branch, for example:
$ git checkout -b tempbranch $ git reset --hard XXXXXXX
Git Now the log will tell you that you have one compressed blue message.
Go back to your main branch and reinstall again, this time skipping the blue commit and crushing the red ones together:
$ git rebase -i HEAD~4 pick bb5599b Red fixup 553d733 Red drop 488c19e Blue fixup a341d97 Red
Git Now the magazine will show you that you have only one red commit. Now you are cherry-pick Blue again:
$ git cherry-pick 488c19e $ git log --oneline fc96b04 Blue 0280ef9 Red
You will encounter problems if they all relate to the same files. In this case, you just need to keep highlighting red around blue.
Attention!
I highly recommend that you advise all members of your Github project to distribute all their commits to one of them as part of the traction request process, then you will not have to solve these problems yourself.
NTN.