First storification of the index chapter

This commit is contained in:
blinry 2021-02-02 16:42:55 +01:00
parent 01d8fe3d3e
commit 09bbf7a0ad
9 changed files with 136 additions and 52 deletions
levels/index

45
levels/index/compare Normal file
View file

@ -0,0 +1,45 @@
title = Step by step
cards = checkout
[description]
Welcome to today's lesson! Today, we're going to learn how to make commits with precision!
Have a look at these two timelines. They have exactly the same outcome. But one of them makes it much easier to figure out what happened.
[setup]
echo "A small, but heavy glass ball." > ball
echo "A thin book, that's standing upright." > book
echo "A candle, burning with a blue flame." > candle
git add .
git commit -m "The beginning"
git branch -M all-at-once
echo "The ball is now touching the book." > ball
echo "The book has fallen over." > book
echo "The candle has been blown out." > candle
git commit -am "The end"
git checkout HEAD^
git checkout -b step-by-step
echo "The ball is now touching the book." > ball
git commit -am "The ball rolls towards the book"
echo "The book has fallen over." > book
git commit -am "The book falls over"
echo "The candle has been blown out." > candle
git commit -am "The book blows out the candle"
git checkout HEAD~3
[win]
# This level doesn't have a goal yet.
false