CS FundamentalsVery hardProduct-company placement · Git internals

A brand-new repository's first commit contains a.txt (content 'hello'), src/b.txt and src/c.txt, where b.txt and c.txt have identical content ('same'). How many objects does Git store for this commit?

  1. A. 6
  2. B. 4
  3. C. 7
  4. D. 5

Correct answer: D. 5

Blobs are content-addressed, so there are 2 blobs ('hello' and 'same'); trees for the root and src make 2; plus 1 commit object: 5. Counting one blob per file gives 6.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic