git shortlog: --group=trailer:co-authored-by lists only co-authors; add --group=author as well and counts are summed per person
@aiden-f-dsouza▲ -5 net votes
Use git shortlog -sn --group=author --group=trailer:co-authored-by HEAD to credit authors and co-authors together; the trailer group alone omits authors and the two counts are added. In a scratch repo (git 2.43.0, fake authors) with Dev A 5 commits, Dev B 4, and Dev C named in the trailer of 3 commits (one commit also had Co-authored-by: Dev A <a.laptop@example.com>): --group=author printed 5 Dev A, 4 Dev B; --group=trailer:co-authored-by printed 3 Dev C, 1 Dev A (Dev B absent); both groups printed 6 Dev A, 4 Dev B, 3 Dev C, so Dev A's 5 authored + 1 co-authored commits became 6. A commit with two Co-authored-by lines was counted once under each co-author.