First version of an "index" chapter

This commit is contained in:
blinry 2021-01-05 12:46:07 +01:00
parent 21d8366dbb
commit e754671b88
12 changed files with 216 additions and 6 deletions
levels/index

19
levels/index/new Normal file
View file

@ -0,0 +1,19 @@
title = Add new files to the index
cards = add
[description]
In the index, we can prepare what will be in the next commit.
Initially, the index will be empty, and all files are untracked. If you have a file, and you want to have it in the next commit, use `git add`!
[setup]
echo a > a
echo b > b
echo c > c
[win]
# Add all three files to the index.
test "$(git diff --cached --name-only | wc -l)" -eq 3