Difference between author and committer in Git?

The original poster asks:

What is the difference between the two (Committer vs author)?

The author is the person who originally wrote the code. The committer, on the other hand, is assumed to be the person who committed the code on behalf of the original author. This is important in Git because Git allows you to rewrite history, or apply patches on behalf of another person. The FREE online Pro Git book explains it like this:

You may be wondering what the difference is between author and committer. The author is the person who originally wrote the patch, whereas the committer is the person who last applied the patch. So, if you send in a patch to a project and one of the core members applies the patch, both of you get credit — you as the author and the core member as the committer.

The original poster asks:

Should I be setting the committer as well to the other user?

No, if you want to be honest, you should not be setting the committer to the author, unless the author and the committer are indeed the same person.

Leave a Comment