Linux command
git-check-mailmap 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Check mailmap entry
git check-mailmap "[Name] <email@example.com>"
Map multiple entries
git check-mailmap "[Name1] <email1>" "[Name2] <email2>"
Read from stdin
echo "[Name] <email>" | git check-mailmap --stdin
说明
git check-mailmap looks up canonical names and email addresses using the mailmap file. It translates author/committer identities to their canonical forms as configured in .mailmap. The mailmap feature consolidates identity variations (typos, name changes, multiple emails) to canonical forms. This command shows how identities will be mapped in git log and shortlog output. This is primarily a debugging tool for verifying that .mailmap entries are correctly resolving contributor identities before relying on them in reports or statistics.
参数
- --stdin
- Read contacts from stdin.
- --help
- Display help information.
FAQ
What is the git-check-mailmap command used for?
git check-mailmap looks up canonical names and email addresses using the mailmap file. It translates author/committer identities to their canonical forms as configured in .mailmap. The mailmap feature consolidates identity variations (typos, name changes, multiple emails) to canonical forms. This command shows how identities will be mapped in git log and shortlog output. This is primarily a debugging tool for verifying that .mailmap entries are correctly resolving contributor identities before relying on them in reports or statistics.
How do I run a basic git-check-mailmap example?
Run `git check-mailmap "[Name] <email@example.com>"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --stdin do in git-check-mailmap?
Read contacts from stdin.