oh-my-git/levels/tree-nested/description

6 lines
409 B
Text
Raw Normal View History

2020-09-15 22:35:14 +02:00
Trees can also point to other trees! This way, they can describe nested directory structures.
2020-09-15 16:32:00 +02:00
2020-09-15 22:35:14 +02:00
When you add a file inside of a directory to the index, and then call `git write-tree`, it will create a nested tree for the directory, and attach the blob to it.
2020-09-15 16:32:00 +02:00
2020-09-15 22:35:14 +02:00
To solve this level, build a little stick figure, as shown on the left - a tree that points to two blobs, as well to a tree that points to two blobs.