mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-23 21:01:22 +02:00
Work on the intro and the index chapter
This commit is contained in:
parent
4910e4d566
commit
8d333ce56a
31 changed files with 327 additions and 185 deletions
levels/files
|
@ -1,28 +1,27 @@
|
|||
title = No sleep required
|
||||
cards = checkout commit-auto reset-hard file-new file-delete file-rename
|
||||
cards = file-new file-delete file-rename
|
||||
|
||||
[description]
|
||||
|
||||
Our client just let us know they don't need sleep! Huh.
|
||||
Actually, you decide that you don't need any sleep.
|
||||
|
||||
Because of that, they won't require a bed, and have asked you to build some other piece of furniture from the wood.
|
||||
Because of that, you won't require a bed, and can build some other piece of furniture from the wood!
|
||||
|
||||
Can you rename the object into something else, give it a new description, and make a commit from that?
|
||||
|
||||
[setup]
|
||||
|
||||
echo A yellow cupboard with lots of drawers. > cupboard
|
||||
echo A really big yellow shelf. > shelf
|
||||
echo A comfortable, yellow bed with yellow cushions. > bed
|
||||
git add .
|
||||
git commit -m "Initial furniture"
|
||||
|
||||
[win]
|
||||
|
||||
NUM_FILES="$(git ls-tree --name-only -r HEAD | wc -l)"
|
||||
NUM_BEDS="$(git ls-tree --name-only -r HEAD | grep '^bed$' | wc -l)"
|
||||
test "$NUM_BEDS" = 0 && test "$NUM_FILES" -ge 3
|
||||
# Rename the bed into something else, and give it a new description!
|
||||
NUM_FILES="$(ls | wc -l)"
|
||||
! test -f bed && test "$NUM_FILES" -ge 3 && ! grep -r "yellow bed" .
|
||||
|
||||
[congrats]
|
||||
|
||||
Neat! It even still looks a bit comfortable!
|
||||
|
||||
You head out, eager for your first lesson at time travel school!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue