views:

132

answers:

1

Git is implemented as a directed acyclic graph. Children know their parents but not the other way round. This makes sense because i can reach every commit only through a branch or a tag ( generally speaking through a reference). That's how i traverse the tree. What other reasons had the developers of Git to make "the children know their parents but not the other way around"?/ What are the key benefits of this?

+3  A: 

The main benefit is that a revision once committed has never to be changed again. If you update it to include children, you have to rewrite it. That messes up the hash codes used for identity and integrity.

Thilo
it also makes unreachable commits garbage-collectable
hasen j
and transactions easier
Thilo