mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-01 20:42:01 +02:00
Convert "internal" levels to new level format
This commit is contained in:
parent
613b1b9852
commit
53a6885ef9
108 changed files with 727 additions and 382 deletions
levels/internals
35
levels/internals/tree-create
Normal file
35
levels/internals/tree-create
Normal file
|
@ -0,0 +1,35 @@
|
|||
[description]
|
||||
|
||||
After carefully building the index we want, it would be nice to save a permanent snapshot of it, right?
|
||||
|
||||
This is what the second type of objects is for: trees! You can convert the index into a tree using
|
||||
|
||||
git write-tree
|
||||
|
||||
Try it! :)
|
||||
|
||||
[congrats]
|
||||
|
||||
Nice!
|
||||
|
||||
Can you make a different tree? Modify the index, then call `git write-tree` again!
|
||||
|
||||
[setup]
|
||||
|
||||
echo "file 1" > file1
|
||||
echo "file 2" > file2
|
||||
echo "file 3" > file3
|
||||
git add .
|
||||
|
||||
[setup goal]
|
||||
|
||||
echo "file 1" > file1
|
||||
echo "file 2" > file2
|
||||
echo "file 3" > file3
|
||||
git add .
|
||||
|
||||
git write-tree
|
||||
|
||||
[win]
|
||||
|
||||
git cat-file -p 21a638f28022064c1f1df20844278b494d197979
|
|
@ -1,3 +0,0 @@
|
|||
Nice!
|
||||
|
||||
Can you make a different tree? Modify the index, then call `git write-tree` again!
|
|
@ -1,7 +0,0 @@
|
|||
After carefully building the index we want, it would be nice to save a permanent snapshot of it, right?
|
||||
|
||||
This is what the second type of objects is for: trees! You can convert the index into a tree using
|
||||
|
||||
git write-tree
|
||||
|
||||
Try it! :)
|
|
@ -1 +0,0 @@
|
|||
git write-tree
|
|
@ -1,4 +0,0 @@
|
|||
echo "file 1" > file1
|
||||
echo "file 2" > file2
|
||||
echo "file 3" > file3
|
||||
git add .
|
|
@ -1 +0,0 @@
|
|||
git cat-file -p 21a638f28022064c1f1df20844278b494d197979
|
Loading…
Add table
Add a link
Reference in a new issue