Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One thing that has really helped me understand git better is DAG (https://en.wikipedia.org/wiki/Directed_acyclic_graph). Whenever I do `git add <file/folder>`, it is somewhat easier to imagine how new blobs are created and how they are linked.

For beginners it is a fun exercise to understand why empty folders can't be added to git.



Not that there is any reason why git has to forbid the existence of empty tree objects.

(Fun fact, all such empty trees would be deduplicated to a single object).




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: