Git Committing Committing on behalf of someone else


If someone else wrote the code you are committing, you can give them credit with the --author option:

git commit -m "msg" --author "John Smith <>"

You can also provide a pattern, which Git will use to search for previous authors:

git commit -m "msg" --author "John"

In this case, the author information from the most recent commit with an author containing "John" will be used.

On GitHub, commits made in either of the above ways will show a large author's thumbnail, with the committer's smaller and in front:

enter image description here