Linux command
git-coauthor 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Add coauthor to last commit
git coauthor "[Name]" "[email@example.com]"
Add multiple coauthors
git coauthor "[Name1]" "[email1]" "[Name2]" "[email2]"
说明
git coauthor adds Co-authored-by trailers to the last commit message. GitHub and GitLab recognize these trailers to attribute commits to multiple contributors. The command amends the last commit, appending Co-authored-by lines in the format recognized by GitHub and GitLab. Multiple coauthors can be added in a single invocation. This supports pair programming, mob programming, and collaborative coding workflows where attribution should reflect the actual contributors rather than just the person who typed the commit command.
参数
- --help
- Display help information.
FAQ
What is the git-coauthor command used for?
git coauthor adds Co-authored-by trailers to the last commit message. GitHub and GitLab recognize these trailers to attribute commits to multiple contributors. The command amends the last commit, appending Co-authored-by lines in the format recognized by GitHub and GitLab. Multiple coauthors can be added in a single invocation. This supports pair programming, mob programming, and collaborative coding workflows where attribution should reflect the actual contributors rather than just the person who typed the commit command.
How do I run a basic git-coauthor example?
Run `git coauthor "[Name]" "[email@example.com]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --help do in git-coauthor?
Display help information.