$ ./guess_the_languageGit
Git · hard · #40

How many new blob objects does git add store?

$ echo same > s1
$ echo same > s2
$ git add s1 s2
  1. Three, including a tree
  2. None until you commit
  3. Two, one for each path name
  4. One, shared by both paths
Objects are addressed by a hash of their content, so identical content yields one blob that both index entries reference.
Play Git ▸