0 votes
in Git by

What does a Commit object contain?

2 Answers

0 votes
by
The commit object contains the top-level tree object hash, parent commits hash(if any), author and committer information, commit date and commit message.

You can view this through the git log command.

Example:

commit object
0 votes
by

Commit object contain the following components:

It contains a set of files, representing the state of a project at a given point of time reference to parent commit objects

An SHAI name, a 40-character string that uniquely identifies the commit object (also called as hash).

...