mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-01 20:42:01 +02:00
Reorder levels and chapters into a better sequence
This commit is contained in:
parent
5c1f1ce722
commit
c99a35d54f
40 changed files with 128 additions and 288 deletions
levels/time-machine
|
@ -1,53 +0,0 @@
|
|||
title = Parallelism
|
||||
cards = checkout commit-auto
|
||||
|
||||
[description]
|
||||
|
||||
Did you know that creating parallel timelines is perfectly legal and safe? It's true!
|
||||
|
||||
Can you find out when things went wrong in this zoo, and create a parallel universe where everyone is happy?
|
||||
|
||||
[setup]
|
||||
|
||||
mkdir cage
|
||||
echo "Looks very hungry." > cage/lion
|
||||
|
||||
echo "A small child.
|
||||
It really loves cats!" > child
|
||||
git add .
|
||||
git commit -m "The beginning"
|
||||
|
||||
echo "It's holding a lollipop." >> child
|
||||
git commit -am "The child buys something"
|
||||
|
||||
mv child cage
|
||||
git add .
|
||||
git commit -m "The child climbs somewhere"
|
||||
|
||||
git rm cage/child
|
||||
echo "Looks happy. :)" > cage/lion
|
||||
git add .
|
||||
git commit -m "Oh no"
|
||||
|
||||
echo "It's sleeping." > cage/lion
|
||||
git add .
|
||||
git commit -m "Nap time!"
|
||||
|
||||
git checkout --detach
|
||||
git branch -d main
|
||||
|
||||
[win]
|
||||
|
||||
# Is the child still there?
|
||||
git ls-tree --name-only -r HEAD | grep child
|
||||
|
||||
# Is the lion not hungry?
|
||||
git show HEAD:cage/lion | grep -v "very hungry"
|
||||
|
||||
[congrats]
|
||||
|
||||
Whew, good job! This seems like a *much* better outcome.
|
||||
|
||||
Feel free to add more parallel timelines, or make them longer.
|
||||
|
||||
If you're ready, our next mission is already waiting...
|
Loading…
Add table
Add a link
Reference in a new issue