- Use this good git alias
git config --global alias.summary '! git shortlog --summary --numbered --email --all --no-merges'
- Run
git summary
at the root of the repo, you'll get something like
517 Muhammad Sulaiman <muhammad.b.sulaiman001@gmail.com>
514 Muhammad <m.sulaiman001@gmail.com>
468 My Friend <90533@LAPTOP-ABV>
8 Friend Name <hi@there.com>
- Create
.mailmap
file at repo root, first line tells git that this name has this e-mail, second line tells git that there is another alias for this name-email, that uses this second email.. and so on
Muhammad Sulaiman <muhammad.b.sulaiman001@gmail.com>
Muhammad Sulaiman <muhammad.b.sulaiman001@gmail.com> <m.sulaiman001@gmail.com>
Friend Name <hi@there.com>
Friend Name <hi@there.com> <90533@LAPTOP-ABV>
- Run
git summary
again, you'll get something like
1031 Muhammad Sulaiman <muhammad.b.sulaiman001@gmail.com>
476 Friend Name <hi@there.com>