CS FundamentalsVery hardProduct-company placement · Git internals

How many of these statements about Git's object model are correct? 1. Two files with identical content in different folders are stored as a single blob. 2. A commit object records a tree, its parent commit(s), author, committer and message. 3. Renaming a file without changing its content creates a new blob. 4. A commit's hash depends on its parent's hash, so changing an old commit changes the hashes of all its descendants.

  1. A. 1
  2. B. 2
  3. C. 4
  4. D. 3

Correct answer: D. 3

Blobs are addressed by content alone, so identical files share one blob and a rename only changes the tree entry (3 is false). Statements 1, 2 and 4 are true; 4 is why history rewriting changes every later hash.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic