Commit on behalf of someone else

suggest change

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 <johnsmith@example.com>"

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:

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents