I'm seeing this on this GitHub repository:
What does this mean? How can something be "authored 7 days ago", and yet "committed 14 hours ago"?
github
I'm seeing this on this GitHub repository:
What does this mean? How can something be "authored 7 days ago", and yet "committed 14 hours ago"?
Best Answer
Git has a separate concept of the author (the person who wrote the code) and committer (the person who committed it to the repository). Similarly there can be different dates for both. They are usually the same.
You'd want them to be different primarily if the person writing the code or submitting the patch does not have push access to the repository as in projects which use mailing lists for patch submissions. In this case, the person with push access would apply the patch and run
git commit
with either the--author
and--date
switches or using the GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL and GIT_AUTHOR_DATE environment variables (documented in git-commit-tree.The other case is using
git cherry-pick
or git rebase. The committer is the person doing the the cherry pick, and the author is the author of the original commit. Git will handle setting the author identity and date for you.You can see this information in the repository with
git log --pretty=fuller
.