- 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 <[email protected]>
514 Muhammad <[email protected]>
468 My Friend <90533@LAPTOP-ABV>
8 Friend Name <[email protected]>
- 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 <[email protected]>
Muhammad Sulaiman <[email protected]> <[email protected]>
Friend Name <[email protected]>
Friend Name <[email protected]> <90533@LAPTOP-ABV>
- Run
git summary
again, you'll get something like
1031 Muhammad Sulaiman <[email protected]>
476 Friend Name <[email protected]>