What does a commit object contain?

Whenever we do a commit in GIT by using git commit command, GIT creates a new commit object. This commit objects is saved to GIT repository.

The commit object contains following information:

  • HASH: The SHA1 hash of the Git tree that refers to the state of index at commit time.
  • Commit Author: The name of person/process doing the commit and date/time.
  • Comment: Some text messages that contains the reason for the commit .

Leave a Reply

Your email address will not be published. Required fields are marked *