penner penner - 13 days ago 4x
Git Question

Can you tag someone in a git commit message?

Occasionally I would like to call people out in my git commit messages. And also it would let people know they should look at the commit.

Example: "Fix issues caused by +JoeSchmoe"


How you do this depends on how you use Git. There is no built in way to do this within Git, since Git doesn't do any kind of notification.

One option would be to simply set up your own convention, and use your own scripts to extract such commits or send the appropriate notifications in something like a post-receive hook.

However, there are existing conventions for how this works in two common Git based workflows: patches sent via email, and GitHub.

In the patches sent via email workflow, used by the Linux kernel and Git project itself, what you do is add lines at the end of the message of the form:

Cc: Joe Schmoe <>

Then when you use git format-patch and git send-email to format and send your patches via email, Joe Schmoe will be CC'd on the email that is sent out, so should be notified via email about this patch.

The other convention, if you use something like GitHub, is to use an @JoeSchmoe mention of their GitHub username. I do not know off the top of my head, and their help does not specify, whether this works from the commit message itself; but at the very least, in any comment or pull request you make, you can write @JoeSchmoe and he will be notified of the fact that you mentioned him.