Git directed acyclic graph - children know their parents, but not vice versa

Git is implemented as a directed acyclic graph. Children know their parents, but not vice versa. This makes sense because I can achieve each commit only through a branch or tag (generally speaking, through a link). This is how I cross a tree. What other reasons were the developers of Git so that โ€œchildren know their parents, but not vice versaโ€? / What are the main advantages of this?

+4
source share
1 answer

The main advantage is that the corrected incorrect version will never be changed again. If you update it to include children, you must rewrite it. This will ruin the hash codes used for identification and integrity.

+7
source

Source: https://habr.com/ru/post/1304245/


All Articles