How many new blob objects does git add store?
$ echo same > s1 $ echo same > s2 $ git add s1 s2
- Three, including a tree
- None until you commit
- Two, one for each path name
- 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 ▸