Git Committing Committing on behalf of someone else

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

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 <[email protected]>"

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



Got any Git Question?